Hi
I try to populate two words (MATCHED, NOT MATCHED ) for cells in column G based on adjacent cells for column B,H , if the items in adjacent cells for column B,H are the same thing , then should populate word MATCHED for adjacent cell in column G and if not , then should populate word NOT MATCHED for adjacent cell in column G
this is what I have , but Gives error applicaton defined error in this line
ElseIf Target.Value <> Target.Offset(, -6) Then Target.Offset(, -1) = "NOT MATCHED"
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("h7:h500")) Is Nothing Then
If Target.Value = Target.Offset(, -6) Then Target.Offset(, -1) = "MATCHED"
ElseIf Target.Value <> Target.Offset(, -6) Then Target.Offset(, -1) = "NOT MATCHED"
End If
Application.EnableEvents = True
End Sub