Hello,
I've put together the macro below and it runs fine when it's run manually.
I am now trying to get it to run when any change is made to Sheet1 without luck. Can anyone point me in the right direction?
Thank you
I've put together the macro below and it runs fine when it's run manually.
I am now trying to get it to run when any change is made to Sheet1 without luck. Can anyone point me in the right direction?
Thank you
VBA Code:
Sub m()
Dim ThisCell1 As Range
Dim ThisCell2 As Range
For Each ThisCell1 In ThisWorkbook.Sheets("Sheet1").Range("A5:A1000")
'This is the range of cells to check
For Each ThisCell2 In ThisWorkbook.Sheets("Sheet2").Range("A1:A10")
'This is the range of cells to compare
If ThisCell1 <> "" And ThisCell1.Value = ThisCell2.Value Then
ThisCell1.Offset(, 16).Value = "BF5"
Exit For
End If
Next ThisCell2
Next ThisCell1
End Sub