It might be easiest to place Conditional Formatting on A1 so's it turns color if
not equal to B1.
Format>Cells>CF>Formula is: =$A$1<>$B$1
Format to a color and OK
Alternate method for a real pop up box.....................
This sheet event code will be triggered by a calculated change in A1
Private Sub Worksheet_Calculate()
On Error GoTo stoppit
Application.EnableEvents = False
With Me.Range("A1")
If .Value <> Range("B1").Value Then
MsgBox "Please be advised that A1 does not equal B1!!!"
End If
End With
stoppit:
Application.EnableEvents = True
End Sub
Gord Dibben MS Excel MVP
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.