Pulling data from cell next to largest value?

kayskei

New Member
Joined
Aug 31, 2023
Messages
3
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello!

1693494613175.png

(fake data in screenshot, just made up to make it easier to explain what I'm trying to do)

I've got the pivot table in the above screenshot with hours that staff have spent teaching in each discipline, I need to populate the table below that with the discipline that the staff member has the highest number of hours in. For example, because Staff 1 has the most hours in Economics, I need to pull Economics though as the Main Discipline.

Is there a formula I can use to do this or is there something I can do with the pivot table?

Thanks for the help! :)
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Receip.xlsm
ABCDE
2DisplineHour
3Staff1Bussiness36
4Staff1Eco80
5Staff1Fin67
6Staff2Bussiness108
7Staff2Mkt57
8
9
10
11Staff1Eco
12staff2Bussiness
13
14
15
s_k=discount+items&crid=1LU (2)
Cell Formulas
RangeFormula
C11:C12C11=INDEX($C$3:$C$7,MATCH(1,($A$3:$A$7=A11)*($D$3:$D$7=MAX(IF($A$3:$A$7=A11,$D$3:$D$7))),0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 1
Solution
Receip.xlsm
ABCDE
2DisplineHour
3Staff1Bussiness36
4Staff1Eco80
5Staff1Fin67
6Staff2Bussiness108
7Staff2Mkt57
8
9
10
11Staff1Eco
12staff2Bussiness
13
14
15
s_k=discount+items&crid=1LU (2)
Cell Formulas
RangeFormula
C11:C12C11=INDEX($C$3:$C$7,MATCH(1,($A$3:$A$7=A11)*($D$3:$D$7=MAX(IF($A$3:$A$7=A11,$D$3:$D$7))),0))
Press CTRL+SHIFT+ENTER to enter array formulas.

That worked perfectly, thank you!! :)
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,822
Members
449,469
Latest member
Kingwi11y

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