Solved

Problem with IF statement

Posted on 2013-06-06
3
185 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now