|
Sub test()
Dim a&, b&, c&
For m = 2 To 21
If Cells(m, 2) = 0 Or Cells(m, 2) = 5 Then
a = 0
End If
If Cells(m, 2) = 1 Or Cells(m, 2) = 6 Then
a = 2
End If
If Cells(m, 2) = 2 Or Cells(m, 2) = 7 Then
a = 4
End If
If Cells(m, 2) = 3 Or Cells(m, 2) = 8 Then
a = 6
End If
If Cells(m, 2) = 4 Or Cells(m, 2) = 9 Then
a = 8
End If
If Cells(m, 3) = 0 Or Cells(m, 3) = 5 Then
b = 0
End If
If Cells(m, 3) = 1 Or Cells(m, 3) = 6 Then
b = 2
End If
If Cells(m, 3) = 2 Or Cells(m, 3) = 7 Then
b = 4
End If
If Cells(m, 3) = 3 Or Cells(m, 3) = 8 Then
b = 6
End If
If Cells(m, 3) = 4 Or Cells(m, 3) = 9 Then
b = 8
End If
If Cells(m, 4) = 0 Or Cells(m, 4) = 5 Then
c = 0
End If
If Cells(m, 4) = 1 Or Cells(m, 4) = 6 Then
c = 2
End If
If Cells(m, 4) = 2 Or Cells(m, 4) = 7 Then
c = 4
End If
If Cells(m, 4) = 3 Or Cells(m, 4) = 8 Then
c = 6
End If
If Cells(m, 4) = 4 Or Cells(m, 4) = 9 Then
c = 8
End If
Cells(m, 5) = a & b & c
Cells(m, 6) = (a + b) Mod 10 & (a - b + 10) Mod 10
Cells(m, 7) = (b + c) Mod 10 & (b - c + 10) Mod 10
Cells(m, 8) = (c + a) Mod 10 & (c - a + 10) Mod 10
Next
End Sub
|
|