OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

(SOLVED) Help with IF function please

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
chrisd3
General User
General User


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

PostPosted: Tue Oct 04, 2011 5:19 am    Post subject: (SOLVED) Help with IF function please Reply with quote

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
Back to top
View user's profile Send private message
gerard24
OOo Enthusiast
OOo Enthusiast


Joined: 08 Jul 2011
Posts: 100
Location: France

PostPosted: Tue Oct 04, 2011 5:31 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
chrisd3
General User
General User


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

PostPosted: Tue Oct 04, 2011 5:41 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
gerard24
OOo Enthusiast
OOo Enthusiast


Joined: 08 Jul 2011
Posts: 100
Location: France

PostPosted: Tue Oct 04, 2011 5:50 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
chrisd3
General User
General User


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

PostPosted: Tue Oct 04, 2011 6:56 am    Post subject: Reply with quote

Thanks Gerard got there in the end. Just missed out the middle 0 or FALSE and it worked. Thank you again.
_________________
Trying. Always Trying.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group