Static dates

Closed
jaddiso Posts 1 Registration date Wednesday September 17, 2014 Status Member Last seen September 22, 2014 - Sep 22, 2014 at 09:00 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 23, 2014 at 03:53 AM
Hello,
I'm new to the abilities of excel and would appreciate any help. I'm trying to create a worksheet where when any data is entered in column A (starting with A3) the corresponding cell in column D (starting with D3) populates a static date. I have found codes that get me close, but I don't know how to alter them to make them work for me. So if information is entered today in A3 it populates 09/22/14 and stays there, and on the 23rd when infomation is entered into A4 it will auto populate 09/23/14 in D4. Please help and thanks in advace to the brave soul who might take this on.

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Sep 23, 2014 at 03:53 AM
right click tab of sheet1 (where the data is entered)
click "view code"
in the window that comes up copy this event code and save the file
now when you enter any datae in a3 nothing happens
if you enter some data in A4 it is reflected in D4 also.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 1 Then Exit Sub
If Target.Row < 4 Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row, "D") = Target
Cells(Target.Row, "D").NumberFormat = "mm/dd/yy"
Application.EnableEvents = True
End Sub
0