Sub 查找()
For Each rng In Range("a1:d3")
If rng = 7 Then
a = rng.Row
b = rng.Column
End If
Next
MsgBox "行号为" & a & "-" & "列号为" & b
End Sub
Sub aa()
Dim a As Range
For Each a In Range("A1:D3")
If a.Value = 7 Then
MsgBox "a=" & a.Row & " , b=" & a.Column
End If
Next
End Sub