use the result of match function as a part of row address

K

kang

I want to use the result of match function as a part of row address.
that is;
if "=MATCH(B7,$B$1:$B$7,0)" gives 3 then $a$(MATCH(B7,$B$1:$B$7,0))
things like that.

is it possible?
 
J

JMB

=INDEX($A$1:$A$7, MATCH(B7,$B$1:$B$7,0))
or
=INDIRECT("A"&MATCH(B7,$B$1:$B$7,0))

but I usually prefer index for referencing another cell or doing some sort
of lookup as Indirect is volatile (recalculates every time XL does) and, if
you were to move the data in column A (cut/paste or inserting a column and
shifting column A to column B), the indirect function will not adjust itself
to reference the new location of the data. Or, depending on your data, that
may be exactly what you want.
 
K

kang

Thanks a million.
=INDEX($A$1:$A$7, MATCH(B7,$B$1:$B$7,0))
or
=INDIRECT("A"&MATCH(B7,$B$1:$B$7,0))

but I usually prefer index for referencing another cell or doing some sort
of lookup as Indirect is volatile (recalculates every time XL does) and, if
you were to move the data in column A (cut/paste or inserting a column and
shifting column A to column B), the indirect function will not adjust itself
to reference the new location of the data. Or, depending on your data, that
may be exactly what you want.
 

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