Hi Team,
I have a question about Autofill to the last row after identifying a text. This text is unique and shows in a different cell each time
The situation from the code above is that the range starts at "O10" and this is not the case every month. Ideally, I would like this range to start from Range(Selection, Selection.Offset(0, 5)) all the way to the LastRow.
Something like: Selection.AutoFill Destination:=Range(Range(Selection, Selection.Offset(0, 5)) & lastrow)
Would anyone share their wisdom and give me some guidance on how to implement this please
Much appreciated
I have a question about Autofill to the last row after identifying a text. This text is unique and shows in a different cell each time
VBA Code:
'Search for the specific TEXT (= "ABCD") first
Range("A6:AZ1000").Select
Selection.Find(What:="ABCD", After:=ActiveCell, LookIn:=xlFormulas2 _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Select
'Then select a range from that point and the next 6 rows to the right
Range(Selection, Selection.Offset(0, 5)).Select
' Then AUTOFILL down for several rows till find the last row
Selection.AutoFill Destination:=Range("O10:T" & lastrow)
The situation from the code above is that the range starts at "O10" and this is not the case every month. Ideally, I would like this range to start from Range(Selection, Selection.Offset(0, 5)) all the way to the LastRow.
Something like: Selection.AutoFill Destination:=Range(Range(Selection, Selection.Offset(0, 5)) & lastrow)
Would anyone share their wisdom and give me some guidance on how to implement this please
Much appreciated