Auto date change
Closed
StormDronk
-
May 17, 2010 at 04:00 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 17, 2010 at 08:23 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 17, 2010 at 08:23 AM
Related:
- Auto date change
- Grand theft auto v free download no verification for pc - Download - Action and adventure
- Facebook auto refresh - Guide
- Grand theft auto iv download apk for pc - Download - Action and adventure
- Change computer name cmd - Guide
- Facebook date of birth change - Guide
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
May 17, 2010 at 05:52 AM
May 17, 2010 at 05:52 AM
If you want to retain the date for good, then you have to use a macro or do it manually (copy, paste special as value)
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
May 17, 2010 at 07:05 AM
May 17, 2010 at 07:05 AM
If value in A1 is going to be keyed in manually you can use events
to do that
1. Press ALT + F11 to start VBE
2. Press CTRL + R to show project explorer
3. Double click on the sheet where the value of A1 is going to be changed
4. Paste this code
to do that
1. Press ALT + F11 to start VBE
2. Press CTRL + R to show project explorer
3. Double click on the sheet where the value of A1 is going to be changed
4. Paste this code
Private Sub Worksheet_Change(ByVal Target As Range) ' if the event was not triggered by first column (column A) then nothing to do If (Target.Column <> 1) Then Exit Sub ' if event was not triggered by row 1 If (Target.Row <> 1) Then Exit Sub ' disable events so we dont get into cycle of events Application.EnableEvents = False If Target = 1 Or Target = 2 Or Target = 3 Then ' 1 row down, and one column to right Target.Offset(1, 1) = CDate(Now) ' same row and one column to right Target.Offset(0, 1) = "" Else ' 1 row down, and one column to right Target.Offset(1, 1) = "" ' same row and one column to right Target.Offset(0, 1) = CDate(Now) End If ' we are done now we can enable evetns again Application.EnableEvents = True End Sub
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
May 17, 2010 at 08:23 AM
May 17, 2010 at 08:23 AM
yeah since it is a macro, you have to save it as macro enabled file. and when you open the file make sure that you enabled the macro
May 17, 2010 at 06:30 AM
Thanks again for the help!!!