I'm always getting this error when inserting a formula with VBA in Excel 2013:
Run-time error '1004': Application-defined or object-defined error
This is my code:
strFormula = "=(K19 * P13) + (I19 * P13/3,2)"
strCelda = "M20"
Range(strCelda).Formula = strFormula <---- Error
I have tried with these values:
"=(K19 * P13) + (I19 * P13/3.2)"
"=(K19 * P13) + I19 * (P13/3.2)"
with no luck. Whatever the value I enter, I'm still getting the same error.
Range(strCelda).formula = "=(K19 * P13) + (I19 * P13/3.2)"- Excel Hero