Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RC command description

Status
Not open for further replies.

DrLemming

Programmer
Sep 8, 2007
2
DK
Could someone describe the RC command to me while I wait for my VBA for dummmies book to arrive?
 
what do you mean by RC Command?? Are you talking about R1C1 referencestyle?

Cheers,

Roel
 
Sorry sorry sorry beginners problem with posing a question. Yes I was indeed reffering to R1C1 referencestyle Roel and I am dealing with Excel.

I have gotten some knowledge about eferencestyle since I posted the question but a closer understanding of R1C1 style is still needed.

Cheers
Jacob Lemming
 
Hi,

the R1C1 referencestyle works as follows:
Basically R stands for Row and C for Column.

Absolute reference:

$A$1 = R1C1

Now for relative references, you need to put the offset from the cell the formula is in between square brackets.

e.g. formula in cell B2 references A1, B2 would be R2C2, A1 is R1C1, so to refer to it relatively it would be 1-2=-1
that makes for R[-1]C[-1].
If you refer to, say D5, it would be:
Row: 5 - 2 = 3
Col: 4 - 2 = 2
Ref = R[3]C[2]

basically, the cell with the formula is RC, so from there you just count the number of rows and columns from your refered cell.

To reference an entire row, just leave the C-part out (row 1 = R1), for an entire column, leave the R-part out (column C = C3).

It seems a bit complex at first, but once you've gotten used to it, I find it very pleasant to work with.


Hope this makes it a little clearer. If not, don't hesitate to post back.

Cheers,

Roel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top