Sub quweishuzi()
For X1 = 1 To 15
For Y1 = 6 To 50
a = Cells(Y1, X1)
For X2 = 1 To 15
For Y2 = 6 To 50
b = Cells(Y2, X2)
For X3 = 1 To 15
For Y3 = 6 To 50
c = Cells(Y3, X3)
If a + b + c = 254 Then
MsgBox "第一个数" & a & "地址在" & Chr(64 + X1) & Y1 & Chr(13) _
& "第二个数" & b & "地址在" & Chr(64 + X2) & Y2 & Chr(13) _
& "第三个数" & c & "地址在" & Chr(64 + X3) & Y3 & Chr(13)
Exit Sub
End If
Next
Next
Next
Next
Next
Next
End Sub
原帖由 欢欢 于 2008-6-9 14:06 发表
Sub quweishuzi()
For X1 = 1 To 15
For Y1 = 6 To 50
a = Cells(Y1, X1)
For X2 = 1 To 15
For Y2 = 6 To 50
b = Cells(Y2, X2)
For X3 = 1 To 15
...