Column number
Hi Faby,
A slightly better version would be:
'=============
Public Sub Tester()
Dim rng As Range
Dim col As Long
Const rw As Long = 8
Const sFindText As String = "successful"
Set rng = Rows(rw).Find(What:=sFindText, _
After:=Rows(rw).Cells(1), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext)
If Not rng Is Nothing Then
col = rng.Column
MsgBox col
Else
MsgBox """" & sFindText & """ not found in row " & rw
End If
End Sub
'<<=============
---
Regards,
Norman
"Faby" wrote in message
ups.com...
Alleluia!!Thank you Norman, it works!
Thanks a lot
Faby
|