Link to home
Start Free TrialLog in
Avatar of AliciaVee
AliciaVee

asked on

Simple IF statement???

Experts,

It should be simple, but its not working and even when I search on "multiple IFs" and try using / tweaking, still not working using OR or AND in the IF.  Maybe its a sequence of order?

This is what I need
cell F2 has either a date, or is blank
if F2 <1/1/2012, then Y
if F2 is blank, then N
if F2 is > 12/31/2011, then N

Need quickly (sorry)
Avatar of jppinto
jppinto
Flag of Portugal image

=IF(F2="","N",IF(F2<DATE(2012,1,1),"Y","N"))
Please take a look at the attached example...
Simple-IF.xlsx
Avatar of Saqib Husain
=IF(AND(F2<>"",F2<40909),"Y","N")
Avatar of AliciaVee
AliciaVee

ASKER

I tried all 3 examples, in the order that they were posted, and each one has the same issue in that when the date is 12/31/2011, the result should be N, but each is returning Y -- why is that? Help!
ASKER CERTIFIED SOLUTION
Avatar of jppinto
jppinto
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please check the attached file with the various options as examples for you to see the result of the formulas.

jppinto
Simple-IF.xlsx
I get an N. See attached.
Simple-if.xlsx
jppinto -- works!  thanks!!!