Dates older/new with IF

KevinVA

New Member
Joined
Nov 12, 2008
Messages
3
This should be sooooo simple I am embarassed to ask. I have a set of dates in a colum and I want to put a 1 or a 2 in another column depending on if a that date is older/newer than X. Here are the actuals:

Column A:
Starting row is 2
10/30/2009
6/30/2008
2/15/2009
11/6/2009
6/20/2008
8/21/2008
7/1/2010

My key date is 8/1/2009. So I enter =IF(A2=<"8/1/2009",1,2) but it puts 1's in everything except for the last 2 and for those it puts the 2. I've tried it without the quotes, using an absolution reference (I.E. =IF(A2=<$A$1,1,2) and a bunch of other stuff but it just won't work. I have done a lot more complex stuff than this and I can't believe it won't work..LOL.....someone help an obviously brain-dead guy???..Kevin
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I saw a similiar question the other day and I think this is what did the trick
=IF(A2<=("8/1/2009")+0,1,2)
 
Upvote 0
Thanks for the quick response. If I use > it returns 1's for everything and < returns 2's for everything...LOL...what a fun day here...:eek:(...thanks again for trying to help out...Kevin
 
Upvote 0
weird because when I tested it seemed correct
Book1
ABCD
210/30/20092
36/30/20081
42/15/20091
511/6/20092
66/20/20081
78/21/20081
87/1/20102
Sheet1


are you sure the dates are really dates? Not text
 
Upvote 0
Someone beat me to the response, and YES it works..LOL. I was doing a sort for something else and xls yelled about the formatting not being right (some numbers are formatted as text). The problem was that this sheet is the output from a database pulll and all the entries have ="xxxx" instead of just the data (xxxxx). I removed the =" stuff and it worked great.
Thanks for the help.
Kevin
 
Upvote 0

Forum statistics

Threads
1,215,544
Messages
6,125,438
Members
449,225
Latest member
mparcado

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top