FormulaR1C1 syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a need to place different formulas in different cells. I have an
integer C and string Col. C=50 Col=4.

I need a formula like this:
Range("K" & C + 3).Select
ActiveCell.FormulaR1C1 = "=R[1-C]C[-10+Col]-5"

I cannot get the correct syntax for using the variable in the R[] section.
On the worksheet, this formuls should read =E4-5.

Can someone help me with the syntax?
 
Hi
try:
ActiveCell.FormulaR1C1 = "=R[" & 1-C & "]C[" & -10+Col" & ]-5"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top