Audit Log

Excel_Enthusiast

New Member
Joined
Apr 26, 2023
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hi folks,

I'm sure i have done this before but can't remember how or find specifically what im looking for!

Essentially 2 tabs
1. Data
2. Audit

Whenever i change a date in a specific cell in tab 1, I want the Audit tab to create a new row recording the cell that changed and when it was changed.

Preferably VBA.

Thanks!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You haven't stated what range of cells you want to check so I picked B2to C15 for testing : put this is in the worksheet code for the sheet you are checking for changes:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Intersect(Target, Range("B2:C15")) Is Nothing) Then
With Worksheets("Audit")
 LastRow = .Cells(Rows.Count, "A").End(xlUp).Row + 1
 .Cells(LastRow, 1) = Now()
 .Cells(LastRow, 2) = Target.Address
 End With
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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
Back
Top