1

I insert this formula through VBA,

Cells(1, 1).FormulaR1C1 = "=LEFT(A2;5)"

But the formula which gets inserted ends up with apostrophes.

=LEFT('A2';5)

This works perfectly with the R1C1 notation, but not with the A1 type.

1 Answer 1

1

Using .Formula instead of .FormulaR1C1 solved the problem.

Cells(1, 1).Formula = "=LEFT(A2;5)"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .