Excel VBA - 1004 run-time error, Application or object-defined error

后端 未结 2 651
太阳男子
太阳男子 2021-01-25 08:25

I\'m trying to go through a range of cells in a worksheet and write a formula in each one. But I keep getting the error:

Run-time error \'1004\'

Application-de         


        
2条回答
  •  走了就别回头了
    2021-01-25 08:38

    Your problem is with .FormulaR1C1. This tells the formula to expect a Row Number, Column Number style formula reference, but then you give it an address (Column, Row) style formula.

    Change .FormulaR1C1 to .Formula

提交回复
热议问题