0

I want to insert the following formula to a cell

Range("Q12").FormulaR1C1 = "=If(P12>1,1,P12)"

but my output in the cell is below

=WENN('P12'>1;1;'P12')

the problem is it includes ' ' . Please help me to correct this problem

Thanks

1 Answer 1

2

Use the non-R1C1 format:

Sub hfdjs()
    Range("Q12").Formula = "=If(P12>1,1,P12)"
End Sub
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.