Formula Support - Top 10 list using Index and Match

Redlad91

New Member
Joined
Sep 29, 2015
Messages
11
Office Version
  1. 365
Hi, I am currently building a top 15 list for a report which is based off a table of data. Currently i have the below formula but it is only showing the first item when there multiple of the same value.

My formula;
=INDEX(Data!A:A,MATCH(LARGE(IF(Data!D:D="HR",Data!B:B),Output!A2),IF(Data!D:D="HR",Data!B:B),0))

I have copied in below my table and then below this is the output i keep on recieving back using the above formula.

Data Table
Colleague IDAgeNameDepartment
12333​
26​
LewisHR
12334​
27​
RyanFinance
12335​
26​
LouiseHR
12336​
26​
LiamIT
12337​
26​
JoanneFinance
12338​
25​
LisaIT
12339​
23​
BrianHR
12340​
27​
LukeFinance
12341​
26​
JamesIT

Output
NoColleague IDAgeName
1​
12333​
26​
Lewis
2​
12333​
26​
Lewis
3​
12339​
23​
Brian
4​
#NUM!​
#NUM!​
#NUM!​
5​
#NUM!​
#NUM!​
#NUM!​
6​
#NUM!​
#NUM!​
#NUM!​

Is someone able to advise where i can edit my formula so it shows up all the unique values or provide a better formula to use which would resolve the issue.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Book1
ABCDEFGHIJ
1Colleague IDAgeNameDepartmentNoColleague IDAgeNameDepartment
21233326LewisHR11233326LewisHR
31233427RyanFinance21233526LouiseHR
41233526LouiseHR31233923BrianHR
51233626LiamIT     
61233726JoanneFinance     
71233825LisaIT 
81233923BrianHR 
91234027LukeFinance 
101234126JamesIT 
Sheet2
Cell Formulas
RangeFormula
G2:J6G2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($D:$D)/($D:$D="HR"),$F2)),"")
F2:F10F2=IF(ROWS($1:1)<=COUNTIF($D:$D,"HR"),MAX($F$1:F1)+1,"")
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Book1
ABCDEFGHIJ
1Colleague IDAgeNameDepartmentNoColleague IDAgeNameDepartment
21233326LewisHR11233326LewisHR
31233427RyanFinance21233526LouiseHR
41233526LouiseHR31233923BrianHR
51233626LiamIT     
61233726JoanneFinance     
71233825LisaIT 
81233923BrianHR 
91234027LukeFinance 
101234126JamesIT 
Sheet2
Cell Formulas
RangeFormula
G2:J6G2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($D:$D)/($D:$D="HR"),$F2)),"")
F2:F10F2=IF(ROWS($1:1)<=COUNTIF($D:$D,"HR"),MAX($F$1:F1)+1,"")
Hi @bebo021999, Thanks for the reply, I have tested this and it does resolve my issue, it just brought up another issue though and was finding the smallest value. I changed value next to the aggregate action to 14 (Large) but this still shown a lower number.
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDEFGHIJ
1Colleague IDAgeNameDepartmentNoColleague IDAgeNameDepartment
21233326LewisHR11233326LewisHR
31233427RyanFinance21233526LouiseHR
41233526LouiseHR31233923BrianHR
51233626LiamIT
61233726JoanneFinance
71233825LisaIT
81233923BrianHR
91234027LukeFinance
101234126JamesIT
11
Main
Cell Formulas
RangeFormula
G2:J4G2=LET(f,SORT(FILTER(A2:D10,D2:D10="HR"),2,-1),INDEX(f,SEQUENCE(MIN(ROWS(f),15)),{1,2,3,4}))
Dynamic array formulas.
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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