Date Sheet Last Updated, and By Whom

SaraWitch

Board Regular
Joined
Sep 29, 2015
Messages
102
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hello fellow Excel peeps!

I want to record the date an Excel sheet was updated in cell G1. So far I have tried:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Range("G1") = Now()
Application.EnableEvents = True
End Sub

and:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Row = 2 Then
ActiveSheet.Cells(7, 1).Value = TODAY()
End If
End Sub

and:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Dim cell As Range
Set rng = Intersect(Target, Columns("A:T"))
If rng Is Nothing Then Exit Sub
Application.EnableEvents = False
Application.ScreenUpdating = False
For Each cell In rng
Cells(cell.Row, "2") = Now()
Next cell
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub

But none are working for me and I can't work out what I'm doing wrong! :unsure:

And if I can add who last updated the sheet in H1, that would grand!

Using Excel 365....

Any help would be appreciated as need to finish the spreadsheet today!

Ta muchly, folks!
Sara
 

SaraWitch

Board Regular
Joined
Sep 29, 2015
Messages
102
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I thought I had; apologies, Joe, if I hadn't. I have marked your original response as the solution.

Thank you again for your help.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,916
Office Version
  1. 365
Platform
  1. Windows
I thought I had; apologies, Joe, if I hadn't. I have marked your original response as the solution.

Thank you again for your help.
No worries.

If you were able to run it, you would have gotten that message box.
You can manually run it from the View -> Macros -> View Macros, and selecting that "ReEnableEvents" macro and clicking on the "Run" bottom.

As fluff sugggested, closing out of Excel and then re-opening it will also reset it. The code I gave you was a way to do that without having to exit Excel.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,593
Messages
5,637,294
Members
416,963
Latest member
zazama

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top