[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
chrisd3
General User

Joined: 13 Jan 2011
Posts: 9
Location: Stoke, England.

 Posted: Tue Oct 04, 2011 5:19 am    Post subject: (SOLVED) Help with IF function please Hi I have a problem. I have a formula that I am using and it is working fine but when I try to add it together in an IF the first part works okay but the second part doesn't. I know I'm missing something stupid but can't afford to spend any more time just going back and forth on this. Can someone please help??? The formula is =IF(U3="Part Time";SUM(VLOOKUP(ROUND(AM9;2);'Dem Rate'.A\$2:B\$12;2);IF(U3="Full Time";SUM(VLOOKUP(ROUND(AM9;2);'Dem Rate'.D\$2:E\$12;2;0))))) and like I say I know that the first part works ok - ie if U3 does say "Part Time", but when U3 says "Full Time" I get no answer. I've checked where everything points so it must be something in my formula. I think...... Please help_________________Trying. Always Trying.Last edited by chrisd3 on Tue Oct 04, 2011 6:56 am; edited 1 time in total
gerard24
OOo Enthusiast

Joined: 08 Jul 2011
Posts: 100
Location: France

 Posted: Tue Oct 04, 2011 5:31 am    Post subject: Closing parenthesis of SUM at wrong place. =IF(U3="Part Time";SUM(VLOOKUP(ROUND(AM9;2));'Dem Rate'.A\$2:B\$12;2);IF(U3="Full Time";SUM(VLOOKUP(ROUND(AM9;2);'Dem Rate'.D\$2:E\$12;2;0)))) Why SUM, VLOOKUP doesn't return a range ?_________________LibreOffice 3.5.0 on Windows Vista
chrisd3
General User

Joined: 13 Jan 2011
Posts: 9
Location: Stoke, England.

 Posted: Tue Oct 04, 2011 5:41 am    Post subject: Thanks Gerard, however that doesn't solve my issue. =IF(U3="Part Time";SUM(VLOOKUP(ROUND(AM9;2);'Dem Rate'.A\$2:B\$12;2;0) =IF(U3="Full Time";SUM(VLOOKUP(ROUND(AM9;2);'Dem Rate'.D\$2:E\$12;2;0) Both formulas work and give me what I want. The issue is joining them together, so the answer could be to IF part time or full time or false and this is where it falls down. Any help appreciated_________________Trying. Always Trying.
gerard24
OOo Enthusiast

Joined: 08 Jul 2011
Posts: 100
Location: France

Posted: Tue Oct 04, 2011 5:50 am    Post subject:

Oups, i also put the ) in wrong place.

Right formula :
 Code: =IF(U3="Part Time";SUM(VLOOKUP(ROUND(AM9;2);'Dem Rate'.A\$2:B\$12;2;0));IF(U3="Full Time";SUM(VLOOKUP(ROUND(AM9;2);'Dem Rate'.D\$2:E\$12;2;0))))

_________________
LibreOffice 3.5.0 on Windows Vista
chrisd3
General User

Joined: 13 Jan 2011
Posts: 9
Location: Stoke, England.

 Posted: Tue Oct 04, 2011 6:56 am    Post subject: Thanks Gerard got there in the end. Just missed out the middle 0 or FALSE and it worked. Thank you again._________________Trying. Always Trying.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum