VBA tracking cell changes using a references cell

santomax

New Member
Joined
Aug 27, 2022
Messages
6
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
  8. 2007
Platform
  1. 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

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
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Clarity where you want to store the change to the table? Another table? Same worksheet? Can you use XL2BB and show it?
 
Upvote 0
Solution
I was able to find a solution for my problem, I appreciate so much your care
 
Upvote 0
I was able to find a solution for my problem, I appreciate so much your care
You should not mark a post as the solution unless it solved your problem so that others searching for similar issues don't get misled. Perhaps you can reply with the solution you did find, so at least if someone else looks they can see what you did.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,952
Members
449,095
Latest member
nmaske

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