What does “=R[-115]C” mean in VBA for Excel 2011 on Mac?

六月ゝ 毕业季﹏ 提交于 2019-12-10 22:19:03

问题


What does "=R[-115]C" mean in VBA for Excel 2011 on Mac in below code?

Range("F171").Select    'to select a cell
ActiveCell.FormulaR1C1 = "=R[-115]C"

回答1:


It's the offset from the cell that the formula is in. The example you posted...

"=R[-115]C"

...would be offset by -115 rows in the same column, so would be equivalent to =F56.

You can do the same thing with the columns. This...

Range("A1").Select
ActiveCell.FormulaR1C1 = "=RC[1]"

...would give you the formula =B1.



来源:https://stackoverflow.com/questions/29739494/what-does-r-115c-mean-in-vba-for-excel-2011-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!