Sub t()
Dim arr, a%, b%, d%, e%, f%
Range("a1:e7").Font.Size = 11
arr = Range("a1:e7")
0 a = Int(Rnd() * 7) + 1
b = Int(Rnd() * 7) + 1
d = Int(Rnd() * 5) + 1
e = Int(Rnd() * 5) + 1
f = Int(Rnd() * 5) + 1
If a = b Or d = e Or e = f or d=f Then GoTo 0
If arr(a, d) + arr(a, e) + arr(a, f) + arr(b, d) + arr(b, e) + arr(b, f) = 15 Then
Cells(a, d).Font.Size = 25
Cells(a, e).Font.Size = 25
Cells(a, f).Font.Size = 25
Cells(b, d).Font.Size = 25
Cells(b, e).Font.Size = 25
Cells(b, f).Font.Size = 25
Else
GoTo 0
End If
End Sub
数据放在A1:E7 |