Referencing the cell that is calling a function.

  • Thread starter Thread starter Dutch
  • Start date Start date
D

Dutch

Is there a function, or constant string that references
the cell that is calling the function, without putting an
explicit R1C1 reference as an argument?

For example, let's say I wanted to use the offset function
to reference the cell one column to the right of a column.

Instead of using the syntax OFFSET("A1", 0,1), is there a
function or a constant that I could replace the cell
argument with, so it would refer to the cell actually
making the function call?
 
=OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),,1) ...
...

Jason's response works, but

INDIRECT("RC[1]",0)

is so much more compact (and efficient) that it's difficult to justify not using
it.
 
Definitely better than mine. Can you explain what role the
second argument plays in INDIRECT in this siutation? I've
always seen it with 0 or FALSE, but have yet to understand
its significance. Thanks.

Jason
-----Original Message-----
=OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),,1) ...
...

Jason's response works, but

INDIRECT("RC[1]",0)

is so much more compact (and efficient) that it's difficult to justify not using
it.
 
Thanks to both of you!!!

-----Original Message-----
=OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),,1) ...
...

Jason's response works, but

INDIRECT("RC[1]",0)

is so much more compact (and efficient) that it's difficult to justify not using
it.
 
Definitely better than mine. Can you explain what role the
second argument plays in INDIRECT in this siutation? I've
always seen it with 0 or FALSE, but have yet to understand
its significance. Thanks.

There's always online help, but WTH. 2nd arg <>0/True - use A1-style addresses.
2nd arg 0/False - use R1C1-style addresses.
 
Back
Top