TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 303
- Office Version
- 365
- Platform
- Windows
Hello,
I have a formula in cell J2 that is
I want to detect if this changes from TRUE to FALSE or vice versa.
I have tried
However this always fires (wrongly) the first time something is entered on the sheet and J2 recalculates. After that, it works perfectly. How can I stop it triggering the first time?
Thanks for reading.
I have a formula in cell J2 that is
Code:
=EXACT (A2, B2)
I want to detect if this changes from TRUE to FALSE or vice versa.
I have tried
Code:
Private Sub Worksheet_Calculate()
Static MyOldVal
If Range("J2").Value <> MyOldVal Then
MsgBox "Hello"
MyOldVal = Range("J2").Value
End If
End Sub
However this always fires (wrongly) the first time something is entered on the sheet and J2 recalculates. After that, it works perfectly. How can I stop it triggering the first time?
Thanks for reading.