ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Forcing a certain date format in an Excel column (https://www.excelbanter.com/excel-programming/381966-forcing-certain-date-format-excel-column.html)

Angela

Forcing a certain date format in an Excel column
 
Hello-
How can I restrict user data entry in a column to a certain date format?
MM/DD/YYYY

any help much appreciated! thanks

macropod

Forcing a certain date format in an Excel column
 
Hi Angela,

You could set the cell to use Data Validation (see Data|Validation on the
menu). With this, you can even force the input date to fall within a specified
date range - which you could base on the current date if you want to.

For example:
.. click Data|Validation|Settings
.. Allow = 'Date'
.. Data = 'between'
.. Start Date = '=DATE(YEAR(TODAY()),1,1)'
.. End date = '=TODAY()'
.. uncheck 'Ignore blank'
This would force the user to input a date between 1 January this year and
today. Providing your regional settings are in month-day-year form, the user
will have to input the date in MM/DD/YYYY form.

Cheers

--
macropod
[MVP - Microsoft Word]


"angela" <angela @discussions.microsoft.com wrote in message
...
| Hello-
| How can I restrict user data entry in a column to a certain date format?
| MM/DD/YYYY
|
| any help much appreciated! thanks




All times are GMT +1. The time now is 07:26 PM.

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