Reputation: 63
I am trying to drag a formula from a range to its next immediate column with the following code
Range(Cells(11, lc2), Cells(70, lc2)).AutoFill _
Destination:=Range(Cells(11, lc2 + 1), Cells(70, lc2 + 1)), Type:=xlFillDefault
I am facing 1004 error
Please advise
Upvotes: 3
Views: 57
Reputation: 84465
The column you are using, lc2
, has to be included in the destination e.g.
Range(Cells(11, lc2), Cells(70, lc2)).AutoFill _
Destination:=Range(Cells(11, lc2), Cells(70, lc2 + 1)), Type:=xlFillDefault
Meaning you cannot autofill just using column lc2+1
Upvotes: 5