Another way:
Private Sub Worksheet_Change(ByVal Target As Range) Dim cell As Range Dim i As Long With Range("H104, L104, P104, T104, X104") If Application.Intersect(Target, .Cells) Is Nothing Then Exit Sub For Each cell In .Cells i = i + 1 If Abs(Target.Value - Target.Offset(, -2).Value) > 0.02 Then MsgBox "SCALE Check " & i & " HAS FAILED CALIBRATION AND MUST BE RECALIBRATED BEFORE IT CAN BE USED TO TAKE WEIGHTS" End If Next cell End With End Sub
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Thanks shg but when I ran the code I got a type mismatch error on this part
If Abs(Target.Value - Target.Offset(, -2).Value) > 0.02 Then
Only if one of the values is not numeric ...
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks