Validating dates in a cell

B

BrianG

I have a worksheet in which a transaction date is entered into cells
in column A. I need to validate that date when it is entered to
insure it is no earlier than Today() and no greater than Today()+30.
The worksheet is perpetual so data validation at the cell level won't
work. How can I validate the date at a macro level so that the cell
value doesn't become invalid 31 days in the future?

TIA

BrianG
 
M

merjet

Why do you say data validation at the cell level won't work? The
following does for me.

Allow: Date
Data: between
Start date: =TODAY()
End date: =TODAY()+30

Hth,
Merjet
 
B

BrianG

The worksheet is perpetual so I assumed that dates entered this month
would become invalid next month. Now that I think about it, the
validation only occurs at the time of entry. Would this mean that
cell level validation would only become a problem if someone went back
to an old date and tried to edit it to a value that was outside the
validation range?
 
M

merjet

Would this mean that cell level validation would only become a
problem if someone went back to an old date and tried to edit it
to a value that was outside the validation range?

Yes.

Merjet
 

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

Similar Threads

Arithmetic with Cell Dates 1
Validating Dates 22
Count Dates in a range 2
Validating a Formula 2
Excel Vba to change displayed year automatically. 14
Excel Formatting with dates 3
Filter Table based on Cell Value 1
MAcro for validation of Date 1

Top