date validation

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
 
D

Don P

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
 
D

Dusty

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





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top