FormulaR1C1 syntax
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? |
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? |
All times are GMT +1. The time now is 03:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com