How do I refer to a sheet name in this formula?

bigpat

New Member
Joined
Nov 28, 2012
Messages
24
I have a formula: =SUMIF(DINOSAUR!$C$12:$C$37,K$3,DINOSAUR!$A$12:$A$37) where DINOSAUR is the name of another sheet in my workbook (it's also the name of a clinical trial)

But the name also appears in cell F4 as shown here. Now I need to replicate this formula down the sheet for many other studies. How can I refer to cell F4 in this formula so that it will refer to the next sheet each time? I have made sure that the sheet names exactly match the entries in column F.

I tried simply replacing DINOSAUR with F4, I have also tried quotes and square brackets, but I can't make it work.

Ideally the formula should allow for spaces in the sheet names, but if that's a problem I can RenameThemLikeThis.


yAZ1xvc.jpg
[/URL][/IMG]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Use INDIRECT.

=SUMIF(INDIRECT("'"&F4&"'!$C$12:$C$37"), K$3, INDIRECT("'"&F4&"'!$A$12:$A$37"))
 
Upvote 0
Use INDIRECT.

=SUMIF(INDIRECT("'"&F4&"'!$C$12:$C$37"), K$3, INDIRECT("'"&F4&"'!$A$12:$A$37"))

Fantastic - thank you! I'd never heard of INDIRECT before and I need to read up little on it, especially to wrap my head round all those quotes. It seems a weird name for it! I needed to make it $F4 but I hadn't clarified that I need the formula to replicate across other columns too. But I figured that part out.

Thanks again. This is a big help.
 
Upvote 0
All those quotes are only really there in case you have a sheet name with a space, you could remove them but it's probably worth keeping them just in case.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top