is it possible to refer to a cell using an expression?

M

MatthewS

I'm not sure if it matters, but mainly I am asking for Office 2007.

I'd like to know if it's possible to refer to a cell, in the following manner:

Assume I would like to refer to cell A8, so normally I would simply type:
=A8
..

However, would I be able to do the same thing doing anything along the lines
of:
=A(5+3)

or if cell B1 is equal to 8, could I write:
=A(=B1)

or anything else along this line of thinking...

.... any assistance would be great. I very much appreciate your time, and
hope to hear from someone soon. Thanks!!
 
M

Mike H

One way

=INDIRECT("A"&A1)

So if A1 contains 8 then the formula returns the value in A8

Mike
 
G

Gary''s Student

You can use INDIRECT() for both cases:

=INDIRECT("A"&5+3)
will give you the same as =A8
and
=INDIRECT("A"&B1)
will give you the same as =A100
if B1 contains 100
 
M

MatthewS

Thank you all.

From the examples given I was led to the OFFSET function, and both the
INDIRECT and OFFSET [which I hadn't used before] worked out well.

Much thanks.
 

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