Im trying to find an addition to the code blow, which adjusts the 'Selection.AutoFill Destination:=Range("A1:JS5338")' options on sheets 2 and 3
is there a way to identify the last column and last row containing data in "sheet 1" and use this range automatically as the autofill option on sheets 2 and 3?
So if on 'sheet 1' the range of columns containing data is A:JS
and the range of rows containing data is 1:5476
the autofill options on sheets 2 and 3 will automatically use the range A1:JS5476
thanks in advance
is there a way to identify the last column and last row containing data in "sheet 1" and use this range automatically as the autofill option on sheets 2 and 3?
So if on 'sheet 1' the range of columns containing data is A:JS
and the range of rows containing data is 1:5476
the autofill options on sheets 2 and 3 will automatically use the range A1:JS5476
thanks in advance
Code:
Sheets("2 copy check").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "=Sheet1!RC"
Range("A1").Select
Selection.AutoFill Destination:=Range("A1:JS1"), Type:=xlFillDefault
Range("A1:JS1").Select
Selection.AutoFill Destination:=Range("A1:JS5338"), Type:=xlFillDefault
Range("A1:JS5338").Select
Application.CutCopyMode = False
Sheets("3 copy paste").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "=Sheet1!RC"
Range("A1").Select
Selection.AutoFill Destination:=Range("A1:JS1"), Type:=xlFillDefault
Range("A1:JS1").Select
Selection.AutoFill Destination:=Range("A1:JS5338"), Type:=xlFillDefault
Range("A1:JS5338").Select
Selection.Copy
Last edited: