I'm new to using vba so I wanted to know if there's a way I can get excel to show a message box when the value of a cell is not equal to another cell in my worksheet?
I saw this code being used for when the cell is not equal to a specific value: Is there a vba code which opens a msgbox when cell value is not equal to "X"?
type herPrivate Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
For Each myCell In Range("G4:G160")
If (Not IsEmpty(myCell)) And myCell.Value <> 17521 And myCell.Value <> "" Then
MsgBox "INCORRECT SKU RECHECK PALLET AND INFORM SUPERVISOR", vbCritical
Exit Sub
End If
Next myCell
End Sube
Thanks in advance for your help
It could something like this - a lookup function: