Input Mask for Dates

A

Allison

Can I apply an input mask or custom format to cells so
that users do not have to type the slashes for date
entry? Thanks!
 
J

Jason Morin

You can use some VBA code that will interpret a date that
is entered with out "-" or "/". See Chip Pearson's site:

http://www.cpearson.com/excel/DateTimeEntry.htm

Or you could use allow the user to key in a 5 or 6 digit
date such as 10399 (Jan3,1999) or 100704 (Oct7,2004) and
then convert it to a real date in another cell using:

=REPLACE(REPLACE(A1,LEN(A1)-3,,"-"),LEN(A1),,"-")*1

and format as mm/dd/yy.

HTH
Jason
Atlanta, GA
 
Top