If WorksheetFunction.CountIf( Range("A1:C5,E6:G10,A11:C15 "), 1) = 1 Then
For Each a In Range("A1:C5,E6:G10,A11:C15 ")
If a = 1 Then i1 = a.Row: j1 = a.Column: Exit For
Next
End If
MsgBox i1 & " " & j1
End Sub
複製代碼
作者: GBKEE 時間: 2010-10-29 18:01
Sub Ex()
Dim Rng As Range
Set Rng = Range("A1:C5,E6:G10,A11:C15").Find(1)
If Not Rng Is Nothing Then MsgBox "Row " & Rng.Row & " , Column " & Rng.Column
End Sub作者: Hsieh 時間: 2010-10-29 18:08