Re: Searching Excel with VB
There is a find function.
VB Code:
set mycell = Range("A1:A65000").find("cobblers")
if not (mycell is nothing) then
msgbox "The row you are looking for is " & mycell.row
end if
HTH
zaza
Re: Searching Excel with VB
Thanks for the response...
that code looks great.. im i right in saying that it will tell me the row number of the number i typed in??
Im looking for something that will copy the whole row for the number i type in and put it on a different workbook.. if that makes any sense?
Re: Searching Excel with VB
You should be able to replace the msgbox line with something like this:
ThisWorkBook.Rows(mycell.row).Copy Workbooks("name of other workbook").Rows(1)
Where 1 is the row of the other workbook to paste into.