Show Date/Time When Cell on Another Tab Changes

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,480
Office Version
  1. 365
Platform
  1. Windows
On my current tab (Test) in cell E1, I have to insert a date and time stamp whenever cell N5 is changed on another tab (Data).

How would I do that?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
12,979
Office Version
  1. 2013
Platform
  1. Windows
If you do not currently have a Worksheet_Change macro in your Data sheet, then copy the code below and paste it into the Data sheet code module. Access the code module by right clicking the sheet name tab, then click 'View Code' in the pop up menu. The code will run when you make a change to cell N5.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("N5")) Is Nothing Then
    Sheets("Test").Range("E1") = Now
End If
End Sub
If you do have an existing Worksheet_Change macro in that sheet module, then copy and paste it in the reply box and we can combine the two so that you get the desired results. Excel will only allow one procedure per title per module and the change event has to have the title above to trigger.
 

Forum statistics

Threads
1,141,204
Messages
5,704,949
Members
421,372
Latest member
Jamie11

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