Return highest value across multiple sheets as well as sheet name

firemandave

New Member
Joined
Feb 16, 2016
Messages
10
Hi all!

I've been trying to get this one to work for a while now to no avail. I've googled and searched forums, tried all sorts of formulas and just keep running into walls and errors :(

I have a workbook with multiple sheets of staff performance figures. Each staff member's sheet is the same (ie highest $ is always F6 for example) and itself draws data from another workbook. I want to be able to quickly see which staff member has the highest performance figure across a number of values.
All sheets are named after the staff member, so I've created a START sheet (at the start) and and END sheet (of course, at the end).
In order to find the highest value, I've tried formulas such as =MAX(START:END!AN46) (where cell AN46 is the performance figures I'm wanting to compare, but it just results in #VALUE ! errors. Some staff might not have a score for a certain performance figure, so not sure if I need to work in an IFERROR statement? Tried =AGGREGATE(4,6,START:END!AN64) to no avail. If I replace START:END! with the name of each individual sheet (separated by comas) it will return the highest value. Not sure what's going on there...
In order to show the sheet name, I've tried =INDEX(A1:A36,MATCH(MAX(N(INDIRECT("'"&A1:A36&"'!AN64"))),N(INDIRECT("'"&A1:A36&"'!AN64")),0)) where I listed all sheet names from A1 to A36 which also returned #VALUE ! but I'm pretty sure I've missed something there :P

This is doing my head in... help please!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Let's have 3 sheets, named jon, damon, and Nathan, with AN64 equaling 7, 9, and 9.

[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][/tr][tr][td]
1​
[/td][td]SheetList[/td][/tr]
[tr][td]
2​
[/td][td]jon[/td][/tr]
[tr][td]
3​
[/td][td]damon[/td][/tr]
[tr][td]
4​
[/td][td]nathan[/td][/tr]
[tr][td]
5​
[/td][td]Max[/td][/tr]
[tr][td]
6​
[/td][td]
9​
[/td][/tr]
[tr][td]
7​
[/td][td]damon[/td][/tr]
[tr][td]
8​
[/td][td]nathan[/td][/tr]
[tr][td]
9​
[/td][td][/td][/tr]
[/table]


1. Name A2:A4 SheetList in Name Manager.

2. In A6 control+shift+enter, not just enter:

=MAX(N(INDIRECT("'"&SheetList&"'!AN64")))

3. In A7 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX(SheetList,SMALL(IF(N(INDIRECT("'"&SheetList&"'!AN64"))=$A$6,ROW(SheetList)-ROW(INDEX(SheetList,1,1))+1),ROWS($A$7:A7))),"")
 
Upvote 0
=MAX(N(INDIRECT("'"&SheetList&"'!AN64")))

Hi Aladin! Sorry for the delay in my reply as I've been out of action unwell.
Thank you very much for your detailed reply!
I am sure however that there must be something wrong with my data, as when I use the above formula I am still receiving a "#VALUE!" error :(
Not every sheet has a value for AN64... is that the cause? If so, I'm sorry I never mentioned it in the original post!
 
Upvote 0
Hi Aladin! Sorry for the delay in my reply as I've been out of action unwell.
Thank you very much for your detailed reply!
I am sure however that there must be something wrong with my data, as when I use the above formula I am still receiving a "#VALUE!" error :(
Not every sheet has a value for AN64... is that the cause? If so, I'm sorry I never mentioned it in the original post!

You need to apply control+shift+enter to the suggested formulas. That means: Press down the control and the shift keys at the same time while you hit the enter kay. If done correctly, Excel itself puts a pair of { and } around the formula in recognition.
 
Upvote 0
For some sheets in AN64 there is no value, as AN64 is a calculation between two other cells. Of these two other cells, one may be an error (as it itself is a linked value). This then results in a "#VALUE!" error that wrecks everything.
EG These formulas...
[TABLE="class: grid, width: 1000, align: left"]
<tbody>[TR]
[TD="width: 130"]=IF(ISERROR(('WK 1'!$O$56)),"",('WK 1'!$O$56))[/TD]
[TD="width: 130"]=IF(ISERROR(('WK 2'!$O$56)),"",('WK 2'!$O$56))[/TD]
[TD="width: 130"]=SUM(AM64/AL64)[/TD]
[/TR]
</tbody>[/TABLE]




...produce these results.

[TABLE="class: grid, width: 195"]
<tbody>[TR]
[TD="width: 65"][/TD]
[TD="width: 65, align: right"]$32.50
[/TD]
[TD="width: 65, align: center"]#VALUE!
[/TD]
[/TR]
</tbody>[/TABLE]


Sorry for my dodgy tables!!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,896
Messages
6,181,622
Members
453,058
Latest member
rmd0725

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