Variable linking?

M

Mike

I have the following formula that links to the "Dec"
worksheet:

=Dec!A1

I would like for this cell (and others like it on this
sheet) to point to different worksheets depending on user
input. I'd like for the user to put the worksheet name
in cell B2 and have the formula change depending on the
value of B2. Is this possible without a macro?

Thanks,
Mike.
 
P

Peo Sjoblom

Yes it is, you can use indirect

=INDIRECT("'"&$B$2&"'!"&CELL("address",A1))

if you want to be able to copy down and get the contents of A2, A3 and so
on,
if you want a fixed cell

=INDIRECT("'"&$B$2&"'!A1")

will always refer to A1 regardless how you copy it
 

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