The macro recorder can be your friend
Sub Macro7()
'
' Macro7 Macro
' Macro recorded 3/23/2010 by Donald B. Guillett
'
'
Columns("B:B").Select
Selection.find(What:="Person2", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub
cleaned up
Sub Macro7a()
set c= Columns("B").find("Person2", LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False)
if not c is nothing then msgbox "found it at " & c.row
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"jodleren" wrote in message
...
Hi all
I want to find a whole string in coulumn b
how do I do that?
Set c = ws.Cells.Find(ename, Null, Null, xlWhole) '
xlByColumns
Set c = ws.Cells.Find(ename, "B3", Null, xlWhole) '
xlByColumns
these fails totally
The help does not explain anything
Sonnich