ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Validating dates in a cell (https://www.excelbanter.com/excel-programming/389451-validating-dates-cell.html)

BrianG[_3_]

Validating dates in a cell
 
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


merjet

Validating dates in a cell
 
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


BrianG[_3_]

Validating dates in a cell
 
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?


merjet

Validating dates in a cell
 
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




All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com