[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Simple IF statement???

Posted on 2012-08-23
8
Medium Priority
?
387 Views
Last Modified: 2012-08-23
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)
0
Comment
Question by:AliciaVee
  • 4
  • 2
  • 2
8 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 38325609
=IF(F2="","N",IF(F2<DATE(2012,1,1),"Y","N"))
0
 
LVL 33

Expert Comment

by:jppinto
ID: 38325642
Please take a look at the attached example...
Simple-IF.xlsx
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38325656
=IF(AND(F2<>"",F2<40909),"Y","N")
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:AliciaVee
ID: 38325680
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!
0
 
LVL 33

Accepted Solution

by:
jppinto earned 2000 total points
ID: 38325723
=IF(F2="","N",IF(F2<DATE(2011,12,31),"Y","N"))
0
 
LVL 33

Expert Comment

by:jppinto
ID: 38325733
Please check the attached file with the various options as examples for you to see the result of the formulas.

jppinto
Simple-IF.xlsx
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38325750
I get an N. See attached.
Simple-if.xlsx
0
 

Author Comment

by:AliciaVee
ID: 38325797
jppinto -- works!  thanks!!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question