I'm new to VBA and would really appreciate any guidance on how to perform the following VBA Worksheet Change Event.
What I'm trying to carry out is the following: If I change a cell value in a particular column, I want to extract a different cell value within that row into a different worksheet.
So every time a cell value is updated or added to the worksheet, I will automatically extract data and transfer it to the first empty row of the table in a different worksheet.
Please advise! Any insight would be greatly appreciated. Thanks in advance
Update: Figured it out now.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Lastrow2 As Long
Dim c As Range
Lastrow2 = Worksheets("Action Sheet").UsedRange.Rows.Count
Application.EnableEvents = False
For Each c In Target
If c.Column = 16 Then
Worksheets("Action Sheet").Cells(Lastrow2 + 1, 1).Value = Target.Value
End If
Next c
Application.EnableEvents = True
End Sub