I have a large database that I need to be able to see when formula results change. I have the below code that will pop up a message box when there is a change. However, its not convenient for 50+ message boxes to pop up every time the power query is refreshed. Can someone help me modify the code so that the cell simply changes color instead?
Thanks
VBA Code:
Private Sub Worksheet_Calculate()
Dim rng As Range, cell As Range
Dim CellHasChanged As Boolean
Set rng = Me.Range("J3:J2000")
For Each cell In rng.Cells
With cell
CellHasChanged = CBool(.ID <> .Value)
If CellHasChanged Then
.ID = .Value
MsgBox "Cell " & cell.Parent.Name & cell.Address & " has changed.", vbInformation, "Cell Value Changed"
Exit For
End If
End With
Next cell
Set rng = Nothing
End Sub
Thanks