この小さな例では、データ ブロックのメモリを維持しているため、値が実際に変更されたかどうかをテストできます。静的にするために、メモリがサブの上で薄暗く表示されていることに注意してください。
Dim MemoryOfThingsPast() As Variant
Dim init As Long
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Interesting As Range
Dim I As Long, J As Long, K As Long
Set Interesting = Range("A9:J100")
If init = 0 Then
MemoryOfThingsPast = Interesting
init = 1
Exit Sub
End If
If Intersect(Target, Interesting) Is Nothing Then Exit Sub
K = 1
For I = LBound(MemoryOfThingsPast, 1) To UBound(MemoryOfThingsPast, 1)
For J = LBound(MemoryOfThingsPast, 2) To UBound(MemoryOfThingsPast, 2)
v1 = Interesting(K)
v2 = MemoryOfThingsPast(I, J)
If v1 <> v2 Then
MsgBox "Cell " & Interesting(K).Address & " has really changed"
End If
K = K + 1
Next J
Next I
MemoryOfThingsPast = Interesting
End Sub