Formatting the Date in Excel

J

JD

Is there any way in Excel that I can format the Date so I don't have to type
any slashes between the month and day? In other words, I would like to be
able to type in 0714 press "enter" and have excel recognize that this is
07/14/2005 without typing in 07/14.

Any suggestions would be appreciated.

Thanks,
 
D

Dave O

Short of writing code, you could enter your numerics only date in cell
A1, for instance: 07142005. Then in B1 write a formula:
=mid(A1,1,2)&"/"&mid(A1,3,2)&"/"&left(A1,4)

Then you could copy column B and paste as values into their required
spot.
 
M

Matt Lunn

Hi,

Excel will treat those values as numerics. The following formula could be used

=DATE(YEAR(NOW()),IF(LEN(A1)=3,LEFT(A1,1),IF(LEN(A1)=4,LEFT(A1,2),NA())),RIGHT(A1,2))

You would have to ensure that the day portion was always 2 digits with this

eg enter 0701 and not 071 for 1st July. The formula assumes you mean the
current year (as defined on your system). Also, it doesn't check if the month
is 12 or below or for the max number of days for the month.


HTH
Matt
 
Top