If combined with OR & AND
Well, between the 3 of us, myself, David and Pinmaster we "collectively"
came up with the correct answer but invidually, we all missed something!
Pinmaster got the missing ")" for the AND functions but missed the TEXT
dates. David and myself got the TEXT dates but missed the ")" for the AND
functions. So, putting it all together correctly:
=IF(E14=--"1/31/2008",0,if(AND(e14<--"1/31/2008",e14--"1/14/2007"),L14/12,if(AND(e14<--"1/15/2008",e14--"12/31/2007"),L14/24)))
--
Biff
Microsoft Excel MVP
"T. Valko" wrote in message
...
Try expressing the dates like this:
=IF(E14=--"1/31/2008"
Personally, I hate using those kinds of expressions. They're ambiguous and
cryptic. I prefer to use the DATE function like this:
=IF(E14=DATE(2008,1,31)
This can make the formula longer but there is no misunderstanding of what
I'm comparing!
Even better, use cells to hold the dates if you can:
A1 = 1/31/2008
=IF(E14=A1
--
Biff
Microsoft Excel MVP
"Micki" wrote in message
...
Cell E14 contains a date and I want certain things to happen if the date
is
equal to certain criteria. I'm having problems with the syntax.
IF(E14="1/31/2008",0,if(AND(e14<"1/31/2008",e14"1/14/2007",L14/12,if(AND(e14<"1/15/2008",e14"12/31/2007",L14/24)))))
Thank you.
|