date validation

  • Thread starter Thread starter Dusty
  • Start date Start date
D

Dusty

Greetings.

I need a macro or something written using VBA to do date
validation on a cell. For example a cell will contain a
date, 11/24/96. I would like to compare that value to see
if it corresponds to a certain date range (01/01/96 -
12/31/96) and put a value in the cell next to it. Maybe
yes or no if it falls in that range.

Thanks
 
Dusty,
Are you sure you need a marco or VBA? Try this

With 12/24/1996 in A1
1/01/1996 in F1
12/31/1996 in F2

Place this formula in B1:

=IF(AND(A1>=$F$1,A1<=$F$2),"YES","NO")

Don Pistulka
 
That worked - thanks.

-----Original Message-----
Dusty,
Are you sure you need a marco or VBA? Try this

With 12/24/1996 in A1
1/01/1996 in F1
12/31/1996 in F2

Place this formula in B1:

=IF(AND(A1>=$F$1,A1<=$F$2),"YES","NO")

Don Pistulka





.
 
Back
Top