Solved

Problem with IF statement

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

760 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

20 Experts available now in Live!

Get 1:1 Help Now