Reference the sheet name in formula as a number

Guidestone

New Member
Joined
Jul 5, 2018
Messages
14
I'm trying to write the following formula:

=MAX('02'!C5:C18)

But instead of referencing the sheet named "02" I either want to reference a cell that outputs the name or number of the sheet, or have it reference the current sheet (because there are 200 sheets just like this one and they are all the same format, but contain different data). Any idea how I can achieve this?

Thanks,
Chris
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
If you want to reference the current sheet, why not just drop the sheet name?

=MAX(C5:C18)
 
Upvote 0
ASSUMING YOU HAVE THE SHEET NAME STORED IN CELL "A5"

= MAX(INDIRECT("'" & A5 & "'!" & "C5:c18"))


Cell A5 will contain the sheet name, the tic in quotes to the left, and the second tic with the exclamation point on the right will complete the sheet reference.
 
Upvote 0
Because the format will need to be modified by someone else to reference another sheet, and I want the format to be the same for both.
 
Upvote 0
This doesn't seem to be working because I'm getting a #REF ! for that cell. Its only recognizing the A5 and not actually taking the max from C5:C18. I do believe this is the direction I want to go though.

ASSUMING YOU HAVE THE SHEET NAME STORED IN CELL "A5"

= MAX(INDIRECT("'" & A5 & "'!" & "C5:c18"))


Cell A5 will contain the sheet name, the tic in quotes to the left, and the second tic with the exclamation point on the right will complete the sheet reference.
 
Upvote 0
= MAX(INDIRECT("'" & A5 & "'!" & "C5:C18")) works for me, have you included the quotes around C5:C18?
 
Upvote 0
Well, apparently I can't upload an image, nor can I provide a link, nor can I share an image, so I'm not quite sure how to show you what's happening on my screen.
 
Upvote 0

Forum statistics

Threads
1,214,421
Messages
6,119,392
Members
448,891
Latest member
tpierce

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