hey, I have some noobiesh question, it's probably been answered before in some way but I have been searching it but haven't been able to find it.
I want to autofill some range with some formula and I'm using these lines.
only I would like to be able to adjust the range depending on the size of the dataset. so I would to be able to set a number in a cell i.e. A1=20 so that the code changes to![]()
Selection.AutoFill Destination:=Range("B1:B10"), Type:=xlFillDefault Range("B1:B10").Select
![]()
Selection.AutoFill Destination:=Range("B1:B20"), Type:=xlFillDefault Range("B1:B20").Select
Bookmarks