Hey Everyone,
I'm kinda of new to VB and you have all been so helpful. Currently I've been spending the paste little while writing a VB Excel Code that will search a worksheet for specific text ("cat") , once it finds the location of said text it copies the next cell over [Offset(, 1)] into another worksheet (Sheet2). Anywho in my actual code once I find the row I'm looking for I have to copy several columns from that row. So, I'm just curious is there a more efficient way to do this than to use the "Find" function every time? I mean I already know the row I'm looking for, so should I do the entire line of code again just to change the offset to (, 2). and again and again?
Below is the sample code I'm working with
Sub FindCode()
Worksheets("Sheet2").Cells(1, "B").Value = Cells.Find(What:="cat", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Offset(, 1).Value
End Sub
Thanks again everyone for your help!
Bookmarks