2005 dates

D

Dave

I am working on a reservation list for next year.....
how can I get excel to enter 2005 when I put in dates and NOT 2004.......
thanks

Dave
 
D

Don Guillett

You could right click sheet tab>view code>insert this. Now, when you enter a
date below row 4 and in column A the date will be 2005.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 5 Or Target.Column <> 1 Then Exit Sub
If IsDate(Target) Then
Target = DateSerial(2005, Month(Target), Day(Target))
End If
End Sub
 
D

Dave

thanks ! I was trying to keep it "automated"!
so that when I type 5/13 it would display may 13 2005
couldn't get it to do that for me!
D
 
D

Don Guillett

It will now. Just adjust the rows/columns to suit. There will also be the
added bonus of not taking a non date
 
M

Michael

If you change the system clock to any date in 2005 (double click the time at
the right of the status bar) when you enter a month,day, excel will add the
2005 for you. When finished, change the system clock back to the correct
date.
 
Top