Formula to Return 5 Highest/Lowest Scores from Pivot Table

marvin jones

Board Regular
Joined
Mar 16, 2016
Messages
86
Hi All,

I have a pivot table which contains a row of months with a column of employees. I have sorted the data with highest scores first, but don't know how to write a formula which returns with the top 5 highest/lowest employees per month.

Also, as in the example below, there are blanks in the pivot due to employees not being in.

Example:
04050607
Driver 160.05%52.01%61.31%
Driver 254.82%
Driver 339.49%51.81%60.10%
Driver 450.55%55.41%

<tbody>
</tbody>

Please can anybody help.

<tbody>
</tbody>
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
HEIGHESTLOWEST
1=INDEX(Pivot!A:A,MATCH(BIG(Pivot!B:B,1),Pivot!B:B,0))=INDEX(Pivot!A:A,MATCH(SMALL(Pivot!B:B,1),Pivot!B:B,0))
2=INDEX(Pivot!A:A,MATCH(BIG(Pivot!B:B,2),Pivot!B:B,0))=INDEX(Pivot!A:A,MATCH(SMALL(Pivot!B:B,2),Pivot!B:B,0))
3=INDEX(Pivot!A:A,MATCH(BIG(Pivot!B:B,3),Pivot!B:B,0))=INDEX(Pivot!A:A,MATCH(SMALL(Pivot!B:B,3),Pivot!B:B,0))
4=INDEX(Pivot!A:A,MATCH(BIG(Pivot!B:B,4),Pivot!B:B,0))=INDEX(Pivot!A:A,MATCH(SMALL(Pivot!B:B,4),Pivot!B:B,0))
5=INDEX(Pivot!A:A,MATCH(BIG(Pivot!B:B,5),Pivot!B:B,0))=INDEX(Pivot!A:A,MATCH(SMALL(Pivot!B:B,5),Pivot!B:B,0))

<tbody>
</tbody>

Pivot!B:B refers to month 04 only.
You may refer to ranking cells in BIG() and SMALL() functions instead of numbers.
 
Last edited by a moderator:
Upvote 0
Hi Flashbond,

Thanks for your reply.

I'm getting a #NAME ? error.

=INDEX('Bradford - Data'!V8:V1000,MATCH(BIG('Bradford - Data'!W8:W1000,1),'Bradford - Data'!W8:W1000,0))

The pivot is in the Bradford - Data tab and the first name starts at V8 and the first value starts at W8.

Have i typed the formula incorrectly?

Thank you.
 
Upvote 0
Hi Flashbond,

Thanks for your reply.

I'm getting a #NAME ? error.

=INDEX('Bradford - Data'!V8:V1000,MATCH(BIG('Bradford - Data'!W8:W1000,1),'Bradford - Data'!W8:W1000,0))

The pivot is in the Bradford - Data tab and the first name starts at V8 and the first value starts at W8.

Have i typed the formula incorrectly?

Thank you.

Aahaha :)) Please replace BIG with LARGE

Sorry my bad ;)
 
Last edited by a moderator:
Upvote 0
Hi Again,

The formula which looks at the pivot table to find the smallest value and return the driver name: =INDEX('Bradford - Data'!$V:$V,MATCH(SMALL('Bradford - Data'!$W:$W,3),'Bradford - Data'!$W:$W,0)) is returning an odd value.

The name being returned is of a driver who did not work that month and so has no value. Is this formula assuming no value is the lowest value and therefore returning this driver? Is there a way the small formula above can search by a value of 0% and higher?

Thanks,
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,677
Members
449,092
Latest member
tayo4dgacorbanget

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