I am trying to create macros that are not cell specific but task oriented. For example, I want to place the cursor on destination cell in worksheet 1, goto worksheet 2, search for a string, copy the next 3 lines and then past back on worksheet 1. However, i cannot record what i would call relative behaviour.
The recording will only pick up specific cell locations. To clarify, regardless of the search on worksheet 2, this macro will ALWAYS copy (A18:A20) not 'the next 3 lines from the cursor after search and find puts the cursor on cell with found text. Ex. below
Sub forum()
'
' forum Macro
' Macro recorded 10/21/2008 by xx
'
'
Sheets("WEb").Select
Range("A1").Select
Cells.Find(What:="owning", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Range("A18:A20").Select
Selection.Copy
Sheets("Final").Select
End Sub
Bookmarks