Help in Formula

  • Thread starter Thread starter spgonz
  • Start date Start date
S

spgonz

I have a simple formula "='00318'!$P$10". What I would
like to do is replace 00318 with a value from a cell (A10)
in the worksheet.
 
Try

=INDIRECT("'"&A1&"'!$P$10")


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Thanks so much for your help. If you have time just a
follow-up.... What would change if the cell (P10) was in
a different workbook?

Thanks again
 
Now it's getting complicated :-)
If the other workbook is opened use
=INDIRECT("'[book2.xls]" & A1&"'!$P$10")

If the other worbook is closed, this won't work. Have a look at the
following thread for workarounds:
http://tinyurl.com/2c62u

In your case INDIRECT.EXT (from the Morefunc add-in) would work
 
It doesn't have to change at all if A1 holds the workbook name and the
sheet, but the format has to be
[workbook_name]sheet_name. For instance

[myWorkbook.xls]00318

But the other workbook has to be open for this to work, it doesn't work with
closed workbooks.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top