Change sheet name in formula

G

Guest

I use the folowing formula in a summary sheet that looks at specific cells on
other work sheet. =-1*SUM('5-4'!$O$41:$O$45) The worksheets are named 5-1,
5-2, etc. on my summary sheet I have a column that contains the work sheet
names formatted as text. I tried substituting a cell reference and various
text functions for '5-4' with and without the ' ' but when I do, Excel tries
to open a file. How can I make the formula look at the same cells on
different woorksheet without having to edit each formula or pointing to the
cells each time I ad a new worksheet?
 
S

ScottO

If all of the worksheets are in the same workbook, try using the INDIRECT function (refer to
in-built help for syntax).
Rgds,
ScottO

| I use the folowing formula in a summary sheet that looks at specific cells on
| other work sheet. =-1*SUM('5-4'!$O$41:$O$45) The worksheets are named 5-1,
| 5-2, etc. on my summary sheet I have a column that contains the work sheet
| names formatted as text. I tried substituting a cell reference and various
| text functions for '5-4' with and without the ' ' but when I do, Excel tries
| to open a file. How can I make the formula look at the same cells on
| different woorksheet without having to edit each formula or pointing to the
| cells each time I ad a new worksheet?
 
B

Bob Phillips

Use

=-1*SUM(INDIRECT("'"&A1&"'!$O$41:$O$45"))

where A1 holds the sheet name.
 

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