santomax
New Member
- Joined
- Aug 27, 2022
- Messages
- 6
- Office Version
- 365
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
- Platform
- Windows
Hi everyone.
I am creating a VBA code that lets me timestamp changes made to a cell. I am able to get it to work if the cell being changed is inputted as a string or text value, but the cells I want to keep tracking changes from are references from a table, which does not capture the change.
Something like this: =IFERROR(Table_1[@Status],"")
Would anyone be able to help me of how to change the VBA code for it maybe to use the referenced value as a text for the tracking to take place? Thank you so much in advance
I am creating a VBA code that lets me timestamp changes made to a cell. I am able to get it to work if the cell being changed is inputted as a string or text value, but the cells I want to keep tracking changes from are references from a table, which does not capture the change.
Something like this: =IFERROR(Table_1[@Status],"")
Would anyone be able to help me of how to change the VBA code for it maybe to use the referenced value as a text for the tracking to take place? Thank you so much in advance
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
With ActiveSheet
Dim ar As Long: ar = Target.Row
Dim rr(0 To 2) As String, result As String
rr(0) = Target.Value: rr(1) = Now: rr(2) = Application.UserName
result = Join(rr, ", ")
.Cells(Target.Row, .Columns.Count).End(xlToLeft).Offset(, 2).Value = result
Erase rr
End With
End If
End Sub