Requests
1 TopicUse VBA to Autofill a Row until the end of the number of data in another row
Hello, I need some help with the following problem: The Macro should select the first cell with the vlookup (AY2) and autofill the complete range in the column AY until the last row that contain data in the cell next to it (Column E). Column E is the cell that the vlookup refers to. The situation looks like this: The code that I have so far looks like this: Sheets(3).Select Range("AY2").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-41],DennisAR!C[-50],1,0)" Selection.AutoFill Destination:=Range("AY2:AY1662") Range("AY2:AY1662").Select The problem with this is, that the number of rows with data always change every week. So I cannot use a static row number of 1662. I am looking for a way to make Destination:=Range("AY:AY1662) dynamic. In fact it has to refer to the number of rows with data in column E. Thank you very much in advance, KaiSolved669KViews1like83Comments