# Solved: Excel VBA term



## Bob Parks (Jan 10, 2004)

Hello,
I'm new to VBA and the course I taking has an expression that confuses me.

"=Average(RC[-1],RC[-2])"

I understand the average of the two columns to the left of the active cell but I don't understand what RC means. It seems to be a short hand for Row and Column.

The entire statement is ActiveCell.FormulaR1C1 = "=Average(RC[-1],RC[-2])"

I will appreciate an explanation of what the RC means and why it is there.

Thanks

Bob


----------



## exegete (Oct 26, 2005)

Bob Parks said:


> Hello,
> I'm new to VBA and the course I taking has an expression that confuses me.
> 
> "=Average(RC[-1],RC[-2])"
> ...


Howdy, Bob.

There are two schemes for referring to cells. The Letter/number combination is most familiar (Cell A2), which is a transition feature from Lotus. However, the underlying approach of Excel is Row and Column numbers. You can can in the Options to display R1C1 notation all the time (General tab).

RC[-1], means to stay in the same row, but go to the left one column (-1).

RC[-2], means stay in the same row, but go two columns to the left (-2).


----------



## Bob Parks (Jan 10, 2004)

Hi Rich,

If I understand all of this:
=Average(R[-1]C[-1] etc would go one row UP and one column LEFT.

In the book formula the absence of anything for R means "same" or am I missing things?

Thanks


----------



## exegete (Oct 26, 2005)

Yes, you are correct. I used the reference in your original formula.


----------

