ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   FormulaR1C1 v Formula (https://www.excelbanter.com/excel-programming/398442-formular1c1-v-formula.html)

Smallweed

FormulaR1C1 v Formula
 
Can anyone tell me the definitive difference between the range properties
FormulaR1C1 and Formula? I know the former is meant to use R1C1 notation the
latter seems to work just as well for relative formulas, e.g. if the cursor
is in A2:
ActiveCell.FormulaR1C1 = "=R[-1]C" gives me the formula =A1 in the same way
as:
ActiveCell.Formula = "=R[-1]C" does.

However, while:
ActiveCell.Formula = "=A1" gives me the same,
ActiveCell.FormulaR1C1 = "=A1" gives me ='A1'

Tom Ogilvy

FormulaR1C1 v Formula
 
Matching A1 style notation with Formula and R1C1 style with FormulaR1C1
should give you the expected output.

Formula may be more robust, but would have problems in an ambiguous
situation.

--
Regards,
Tom Ogilvy


"Smallweed" wrote:

Can anyone tell me the definitive difference between the range properties
FormulaR1C1 and Formula? I know the former is meant to use R1C1 notation the
latter seems to work just as well for relative formulas, e.g. if the cursor
is in A2:
ActiveCell.FormulaR1C1 = "=R[-1]C" gives me the formula =A1 in the same way
as:
ActiveCell.Formula = "=R[-1]C" does.

However, while:
ActiveCell.Formula = "=A1" gives me the same,
ActiveCell.FormulaR1C1 = "=A1" gives me ='A1'



All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com