Change default value to 2004

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
 
D

Don Guillett

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
 
R

Ron Rosenfeld

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top