gio123bg
05-25-2010, 12:29 PM
Hi All,
when I want to extend a formula in a range of rows below the cell where the formula has been set, I have this error
Runtime error '1004'
autofill method of range class failed
I use this VBA code
Sheets("Sheet3").Range("BF8").Formula = Sheets("Sheet1").Range("I64").Formula
Selection.AutoFill Destination:=Range("BF9:BF12"), Type:=xlFillDefault
Range("BF9:BF12").Select
My intention is to have for each row a formula that is adapted for the row where it is set.
i.e IF A1 = x (row 1)
IF A2 = x (row 2)
Any idea?
Thanks in advance for your kind support.
Giovanni
when I want to extend a formula in a range of rows below the cell where the formula has been set, I have this error
Runtime error '1004'
autofill method of range class failed
I use this VBA code
Sheets("Sheet3").Range("BF8").Formula = Sheets("Sheet1").Range("I64").Formula
Selection.AutoFill Destination:=Range("BF9:BF12"), Type:=xlFillDefault
Range("BF9:BF12").Select
My intention is to have for each row a formula that is adapted for the row where it is set.
i.e IF A1 = x (row 1)
IF A2 = x (row 2)
Any idea?
Thanks in advance for your kind support.
Giovanni