FormulaR1C1

V. III

Board Regular
Joined
Sep 19, 2003
Messages
71
Can someone explain simply what the properties of FormulaR1C1 are.

Thanks

V
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
From help file: (I think it is quite simle)

In R1C1 reference style, Microsoft Excel indicates the location of a cell with an "R" followed by a row number and a "C" followed by a column number. For example, the absolute cell reference R1C1 is equivalent to the absolute reference $A$1 in A1 reference style. If the active cell is A1, the relative cell reference R[1]C[1] refers to the cell one row down and one column to the right, or B2.

The following are examples of references in R1C1 style.


R[-2]C - A relative reference to the cell two rows up and in the same column
R[2]C[2] - A relative reference to the cell two rows down and two columns to the right
R2C2 - An absolute reference to the cell in the second row and in the second column
R[-1] - A relative reference to the entire row above the active cell
R - An absolute reference to the current row
 
Upvote 0
So... if I wanted to fill in relative cell C3 with the word 'January', I would use...

Range("B2") .Select
ActiveCell.FormulaR1C1

...and Excel would move down one and across one from the active cell (in this case B2) and enter the word January?

Obviously that's a convoluted way of doing it. But in terms of what the FormulaR1C1 does, is this correct?
 
Upvote 0
The FormulaR1C1 property is like the Formula property, except that it requires an R1C1 style reference to be passed to it. It puts a formula in a range; it doesn't change the selection. What you need is one of:

Code:
ActiveCell.Offset(1, 1).Value = "January"
ActiveCel.Cells(2, 2).Value = "January"
ActiveCell.Range("B2").Value = "January"
 
Upvote 0
Ok, that makes more sense (I think). So the FormulaR1C1 bit is just specifying that it needs a cell reference type range for the 'January' text to be entered into? So I could technically remove the R1C1 part and as long as I kept a cell reference as the range then it would still work (although it could cause issues if a non-cell reference range was added)?

I'm not trying to actually enter anything myself. Just trying to get a clear idea of FormulaR1C1.
 
Last edited:
Upvote 0
As I said the FormulaR1C1 property is like the Formula property, except that it requires an R1C1 style reference to be passed to it. It puts a formula in a range. If B2 contains the formula =C3, the equivalent in R1C1 reference style would be =R[1]C[1].
 
Upvote 0
Ok, thank you. I only started learning VBA two days ago, so apologies if my question seemed a bit naive.
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,525
Members
448,969
Latest member
mirek8991

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top