View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default FormulaR1C1 syntax

Hi
try:
ActiveCell.FormulaR1C1 = "=R[" & 1-C & "]C[" & -10+Col" & ]-5"

--
Regards
Frank Kabel
Frankfurt, Germany
"JCanyoneer" schrieb im Newsbeitrag
...
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?