Private Function FindPos(intColumn As Long, strContent As String) As Integer
Dim i As long
i = 1
Do While i < 200000'这下满足了吧
If CStr(ThisWorkbook.ActiveSheet.Cells(i, intColumn)) = strContent Then
FindPos = i
Exit Do
End If
i = i + 1
Loop
End Function
Public Sub s()
MsgBox FindPos(1, "a")'1是第一列,a是特定数据
End Sub
Private Function FindPos(intColumn As Integer, strContent As String) As Integer
Dim i As Integer
i = 1
Do While i < 30000
If CStr(ThisWorkbook.ActiveSheet.Cells(i, intColumn)) = strContent Then
FindPos = i
Exit Do
End If
i = i + 1
Loop