How to reference a worksheet which name is specified in a cell

  • Thread starter Thread starter pimar
  • Start date Start date
P

pimar

Hi all,
I'm trying to reference a worksheet which name is specified in a cell.
Example:

assuming that cells A1 and A2 contain the name of my sheets :

A1 Sheet A
A2 Sheet B

in cell C1 I need to get a value from "Sheet A", like ='Sheet A"!X1,
while in C2 I'd like to have ='Sheet B'!X1
but I'd like to get bthe name of sheets from cell A1 and A2,

something like

C1 ='$A$1'!X1
C2 ='$A$2'!X1

Which is the right sintax?

Thanks in advance
*pimar
 
Hi pimar,

I think this is what you want:

A
1 Sheet A
2 Sheet B
3 =INDIRECT("'"&A1&"'"&"!X1")
4 =INDIRECT("'"&A2&"'"&"!X1")

The apostrophes within the double quotes allow for sheet names with
spaces.
No visual basic programming required.

Best Regards,
Walt Weber
 

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

Back
Top