Solved

Problem with IF statement

Posted on 2013-06-06
3
207 Views
Last Modified: 2013-06-06
The below IF statement is not working as I need it to be

=IF(H2<10/29/2012,"Pre","Post")

What I need to do is check the date in H2 and if it is less than 10/29/2012 then return Pre, else return Post.
The date formating for H2 = xx/xx/xxxx
0
Comment
Question by:Frank Freese
3 Comments
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 250 total points
ID: 39225485
10/29/2012 won't be recognised as a date like that,  try either

=IF(H2<"10/29/2012"+0,"Pre","Post")

or better to use unambiguous DATE function like this

=IF(H2<DATE(2012,10,29),"Pre","Post")

regards, barry
0
 
LVL 1

Accepted Solution

by:
Teknodok earned 250 total points
ID: 39225502
=IF(H2<DATEVALUE("10/29/2012"),"Pre","Post")
0
 

Author Closing Comment

by:Frank Freese
ID: 39225535
both great answers
thank you
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

679 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