Change default value to 2004

  • Thread starter Thread starter prasad
  • Start date Start date
P

prasad

How do I set the default value of a column so that when I
input dates it reads dates for 2004. For example when I
input 29 Jun in cell C 11 it reads 29 June 2003. I would
like to change so it defaults to 29 June 2004.

Prasad
 
try this
right click on sheet tab>view code>copy/paste this>SAVE
as written will work below row 1 and in column A
assumes entry of 4/1 11/11 ,etc

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Row > 1 Then
On Error GoTo fixit
Target.Value = Month(Target) & "/" & Day(Target) & "/" & Year(Target) + 1
fixit:
Application.EnableEvents = True
End If
End Sub
 
How do I set the default value of a column so that when I
input dates it reads dates for 2004. For example when I
input 29 Jun in cell C 11 it reads 29 June 2003. I would
like to change so it defaults to 29 June 2004.

Prasad

You can change your computer clock to a date in 2004.


--ron
 
Back
Top