Forum Discussion
Mark_Smith_007
Feb 16, 2021Copper Contributor
VBA help required pls to detect a changed field based and execute a macro
I have this in my Macro to detect a change to column O but I now only want it to execute if column A contains an 'x' as well. So if O71 is changed and A71=X then execute the macro. Thanks, Mark '...
- Feb 16, 2021
For example:
'Detect change If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("O1:O1000")) Is Nothing Then If LCase(Range("A" & Target.Row).Value) = "x" Then Call UpdateComments(LastRow) End If End If
HansVogelaar
Feb 16, 2021MVP
For example:
'Detect change
If Target.CountLarge > 1 Then Exit Sub
If Not Intersect(Target, Range("O1:O1000")) Is Nothing Then
If LCase(Range("A" & Target.Row).Value) = "x" Then
Call UpdateComments(LastRow)
End If
End IfMark_Smith_007
Feb 16, 2021Copper Contributor