INDEX MATCH returns same value multiple times

manicmighty

New Member
Joined
Apr 18, 2018
Messages
15
I am trying to create a TOP 5 table using INDEX MATCH and the Top value is returned as 08:00:00 and I have 3 people with this value and the below code returns the same name for each of the three lines:

=INDEX(IntraDayData!B:B,MATCH(E5,IntraDayData!F:F,0))

Can anyone advise what I need to add to the above code to be able to return the second and third names which are in my source data.

Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
What you like -- that you post yourself a small sample for which you get a solution or try self to figure our from an example?
 
Upvote 0
Hi Aladin,

Below is a sample of the data I am using:

Column BColumn CColumn DColumn EColumn F
AgentNameLoggedInDateScheduledHoursLoggedInTimeScheduleDifference
Name618/04/201808:00:0000:00:0008:00:00
Name2118/04/201808:00:0000:00:0008:00:00
Name2418/04/201808:00:0000:00:0008:00:00

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

The formula only returns "Name6" for the three rows that are in the top 5 and I need it to return "Name6" on the first line then "Name21" then "Name24".

Thanks
 
Upvote 0
Yes there around 50+ rows in the data and the examples above are the three names that have 'ScheduleDifference' of 08:00:00 the others are different time values in rank 4 and 5 which show the correct names.

This is how the results look at the moment and 'Name6' currently shows 3 times:

RankDateAgent NameSchedule DifferenceSchedule Adherence
118/04/2018Name608:00:00Non Adherence
218/04/2018Name608:00:00Non Adherence
318/04/2018Name608:00:00Non Adherence
418/04/2018Name1907:25:39Non Adherence
518/04/2018Name3504:00:00Non Adherence

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
@ manicmighty

Here is the set up for you to produce a Top N list.

Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
1​
AgentNameLoggedInDateScheduledHoursLoggedInTimeScheduleDifferencetop
2​
Name618/04/2018
8:00:00
0:00:00
8:00:00
5
3​
Name2118/04/2018
8:00:00
0:00:00
8:00:00
6
4​
Name2418/04/2018
8:00:00
0:00:00
8:00:00
top agentstop diff values
5​
jake18/04/2018
8:00:00
0:00:00
7:25:39
Name6
8:00:00
6​
linda18/04/2018
8:00:00
0:00:00
4:00:00
Name21
8:00:00
7​
aladin18/04/2018
8:00:00
0:00:00
4:00:00
Name24
8:00:00
8​
jake
7:25:39
9​
linda
4:00:00
10​
aladin
4:00:00
11​
12​

In G3 control+shift+enter, not just enter:

=SUM(IF(ISNUMBER(D2:D7),IF(D2:D7>=LARGE(D2:D7,MIN(COUNT(D2:D7),G2)),1)))

This adjusts Top N for ties.

In G5 control+shift+enter, not just enter, and copy down:

=IF($H5="","",INDEX($A$2:$A$7,SMALL(IF($E$2:$E$7=$H5,ROW($A$2:$A$7)-ROW($A$2)+1),COUNTIFS($H$5:H5,H5))))

In H5 just enter and copy down:

=IF(ROWS($H$5:H5)>$G$3,"",LARGE($E$2:$E$7,ROWS($H$5:H5)))
 
Upvote 0

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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