• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run a Macro for the Formula result change in particular cell

nagovind

Member
Dear All,
The below code is working well for a change in the cell value A1 as well as for a change in cell value C2.

Change event needs to be triggered for a FORMULA result in the cell A1 and C2 not the direct entry edit in the cell A1 and C2

Please confirm this code can be used without any issue. Doubt is prevVal is assigned to more than one cell value

Code:
Private Sub Worksheet_Calculate()
    If Range("A1").Value Or Range("C2").Value <> PrevVal Then
        MsgBox "Value Changed"
        
    End If
End Sub

Regards
Govind
 
nagovind
You could track those manually modified cells
... others are consequence of the previous action.
One note for Your #1 reply code
- Range("A1").value will be always true and that's why it would give always Your message.
 

Attachments

  • Trigger event for formula cell change.xlsm
    14.8 KB · Views: 8
Back
Top