Sub s()
Dim rg As Range, c As Range
Set rg = [a11:e17]
cc = Array(1, 2, 3, 4)
t = [h5]
For i = 0 To UBound(cc)
tt = tt & Mid(t, cc(i), 1)
Next
For Each c In rg
k = (30 + Mid(c, 1, 1) - Mid(c, 2, 1) - Mid(c, 3, 1) - Mid(c, 4, 1)) Mod 10
If InStr(tt, k) Then c = ""
Next
End Sub