Yes.
Try this:
in cell F13 your IF formula, say:
=IF(E13=D13,TRUE,"")
Right-click that sheet's tab and paste these two macros:
Code:
Private Sub Worksheet_Calculate()
If Range("F13") = True Then blah
End Sub
Sub blah()
MsgBox "Hello!"
End Sub
Now change E13 and D13 on the sheet to the same.
You could do this another way, a bit shorter by eliminating the IF formula in cell F13 and deleting the Sheet_Calculate event handler (macro), replacing it with the sheet_change event handler:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("D13") = Range("E13") Then blah
End Sub
Bookmarks