Referencing the cell that is calling a function.

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?
 
H

Harlan Grove

=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.
 
J

Jason Morin

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.
 
G

Guest

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.
 
H

Harlan Grove

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top