Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Nested IF or( If And ) can't get it to work

HI Everyone
I'm working on a Vacation Planner and just can't get it to work.
E6 and F6 are dates, G6 is the total of days from F6-E6.
The formula below seems to work except when the cell is empty its still
giving me a count of 1 in G6.
=IF(AND(E6="Half Day",F61),0.5,IF(AND(E6<1,F61),1,F6-E6+1))
From To Qty
E6 F6 G6
12/08/2008 20/08/2008 19 OK starting date included
Empty 20/08/2008 1 OK
Half Day 20/08/2008 0.5 OK
Empty Empty I'm getting 1 Not ok
I tried different IF function but I can't get 4 condition working
I would appreciate some help please
Thank you
John


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default Nested IF or( If And ) can't get it to work

=IF(AND(E6="",F6=""),"",IF(AND(E6="Half
Day",F61),0.5,IF(AND(E6<1,F61),1,F6-E6+1)))

--
__________________________________
HTH

Bob

"John" wrote in message
...
HI Everyone
I'm working on a Vacation Planner and just can't get it to work.
E6 and F6 are dates, G6 is the total of days from F6-E6.
The formula below seems to work except when the cell is empty its still
giving me a count of 1 in G6.
=IF(AND(E6="Half Day",F61),0.5,IF(AND(E6<1,F61),1,F6-E6+1))
From To Qty
E6 F6 G6
12/08/2008 20/08/2008 19 OK starting date included
Empty 20/08/2008 1 OK
Half Day 20/08/2008 0.5 OK Empty Empty
I'm getting 1 Not ok I tried different IF function but I can't get 4
condition working
I would appreciate some help please
Thank you
John




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Nested IF or( If And ) can't get it to work

Thank you very much Bob
Believe it or not I tried it more then once and could not get it to work,
I must of screwed up on the syntax, and spent hours trying to get it to
work.
Regards
John
"Bob Phillips" wrote in message
...
=IF(AND(E6="",F6=""),"",IF(AND(E6="Half
Day",F61),0.5,IF(AND(E6<1,F61),1,F6-E6+1)))

--
__________________________________
HTH

Bob

"John" wrote in message
...
HI Everyone
I'm working on a Vacation Planner and just can't get it to work.
E6 and F6 are dates, G6 is the total of days from F6-E6.
The formula below seems to work except when the cell is empty its still
giving me a count of 1 in G6.
=IF(AND(E6="Half Day",F61),0.5,IF(AND(E6<1,F61),1,F6-E6+1))
From To Qty
E6 F6 G6
12/08/2008 20/08/2008 19 OK starting date included
Empty 20/08/2008 1 OK
Half Day 20/08/2008 0.5 OK Empty
Empty I'm getting 1 Not ok I tried different IF function but I can't get
4 condition working
I would appreciate some help please
Thank you
John





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why doesn't writing a nested IF function work? Littlerose210 Excel Discussion (Misc queries) 1 April 8th 08 06:01 AM
nested if doesn't work Janis Excel Discussion (Misc queries) 1 July 31st 07 05:42 PM
nested vlookup does not work Lupe Excel Worksheet Functions 2 June 2nd 07 03:08 AM
Why doesn't this nested IF statement work? Brandoni Excel Worksheet Functions 4 April 19th 06 10:26 PM
Nested IF - Work Around for 7 nest Max AEICHEN Excel Worksheet Functions 1 April 21st 05 12:09 AM


All times are GMT +1. The time now is 04:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"