0

The first formula is working but the next two formulas are not. Can someone can explain the proper syntax when adding values like this? Like, when to use the ampersand and proper placing of quotations. Thank in advance.

Range("F1").Formula = "=(" & Range("I1").Value * 1000 & ")/1000" Range("D15").Formula = "=(" 1 + Range("D15"").Value * (1 + Range("C15").Value) & )- 1" Range("E15").Formula = "=(" 1 + Range("E15").Value * (1 + Range("C15").Value) & ")- 1"

2
  • First thing I notice is an extra quote here Range("D15"").Value Commented Oct 3, 2017 at 14:32
  • The first formula is right, bare in mind that you need to write your formula as a String. And if you write some variable, it should be "string" & variable_calculation + 1 & "string" Commented Oct 3, 2017 at 14:33

1 Answer 1

3

I'll try to fix it - you are missing ampersands:

Range("F1").Formula = "=(" & Range("I1").Value * 1000 & ")/1000"
Range("D15").Formula = "=(" & 1 + Range("D15").Value * (1 + Range("C15").Value) & ")- 1"
Range("E15").Formula = "=(" & 1 + Range("E15").Value * (1 + Range("C15").Value) & ")- 1"
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.