sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,421
- Office Version
- 2016
- Platform
- Windows
I have this which I am using to track changes to a range;
It works great, tracking the cell value and storing it for use later, but if I selected multiple cells and edit them at once it stores the cell value as 'E11:E15', (as an example), which means I can't use it later because it's not a single cell value.
Can anyone suggest a workaround or tweak so that it stores the value of every cell changed as a separate line?
Code:
Dim xrng As Range Set xrng = Range("A2:N16")
If Not Application.Intersect(xrng, Range(Target.Address)) _
Is Nothing Then
Set ws = Sheet1
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ws.Cells(iRow, 1).Value = ActiveSheet.Name
ws.Cells(iRow, 2).Value = Target.Address(False, False)
End If
It works great, tracking the cell value and storing it for use later, but if I selected multiple cells and edit them at once it stores the cell value as 'E11:E15', (as an example), which means I can't use it later because it's not a single cell value.
Can anyone suggest a workaround or tweak so that it stores the value of every cell changed as a separate line?