Need help with Index + Match Multiple Results

xenohadden

New Member
Joined
Aug 11, 2012
Messages
18
I'm trying to product a list of people who haven't managed to get any lead for a month, I have some examples I have used for the purposes of testing (not the actual figures).

Rich (BB code):
Sales Person    No of Leads     No of Sales 
Joseph               12     6    
John        8     4    
Josh    8     3    
Jamie    9     5    
Jackie    3     3    
Johnson    10     2    
Jonathan    0     -      
Jagjit    7     1    
Jairam    0     4    
Total    57    28

<code style="margin: 0px; padding: 0px; font-style: inherit; "></code><code style="margin: 0px; padding: 0px; font-style: inherit; ">
</code>
I can get the following code to display the results I want, however it will only display one person, even if there are multiple people on zero:

=INDEX('[Team sheet.xlsx]Steves Team'!$B$5:$B$14,MATCH(0,'[Team sheet.xlsx]Steves Team'!$C$5:$C$14,0))

Anyone able to help?
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I'm trying to product a list of people who haven't managed to get any lead for a month, I have some examples I have used for the purposes of testing (not the actual figures).

select_all_icon.jpg
page_white_copy.png


<code style="margin: 0px; padding: 0px; font-style: inherit;">Team Leader No of Leads No of Sales Steve 12 6 Claire 8 4 Tim 8 3 Total 28 13</code>

I can get the following code to display the results I want, however it will only display one person, even if there are multiple people on zero:

=INDEX('[Team sheet.xlsx]Steves Team'!$B$5:$B$14,MATCH(0,'[Team sheet.xlsx]Steves Team'!$C$5:$C$14,0))

Anyone able to help?

A1, control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF('[Team sheet.xlsx]Steves Team'!$C$5:$C$14=0,1))

A2, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF(ROWS($A$2:A2)<=$A$1,INDEX('[Team sheet.xlsx]Steves Team'!$B$5:$B$14,
  SMALL(IF(MATCH('[Team sheet.xlsx]Steves Team'!$C$5:$C$14=0,
   ROW('[Team sheet.xlsx]Steves Team'!$C$5:$C$14)-
    ROW('[Team sheet.xlsx]Steves Team'!$C$5)+1),ROWS($A$2:A2))),"")
 
Upvote 0
I'm trying to product a list of people who haven't managed to get any lead for a month, I have some examples I have used for the purposes of testing (not the actual figures).

Rich (BB code):
Sales Person    No of Leads     No of Sales 
Joseph               12     6    
John        8     4    
Josh    8     3    
Jamie    9     5    
Jackie    3     3    
Johnson    10     2    
Jonathan    0     -      
Jagjit    7     1    
Jairam    0     4    
Total    57    28

<CODE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"></CODE><CODE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px">
</CODE>
I can get the following code to display the results I want, however it will only display one person, even if there are multiple people on zero:

=INDEX('[Team sheet.xlsx]Steves Team'!$B$5:$B$14,MATCH(0,'[Team sheet.xlsx]Steves Team'!$C$5:$C$14,0))

Anyone able to help?
Try this...

Book1
ABCDE
1Sales PersonNo of Leads_CountSales Person
2Joseph12_2Jonathan
3John8__Jairam
4Josh8___
5Jamie9___
6Jackie3___
7Johnson10___
8Jonathan0___
9Jagjit7___
10Jairam0___
11Total57___
Sheet1
<br />
Enter this formula in D2. This will return the count of records that meet the criteria.

=SUMPRODUCT(--(B2:B11=0))

Enter this array formula** in E2:

=IF(ROWS(E$2:E2)>D$2,"",INDEX(A:A,SMALL(IF(B2:B11=0,ROW(B2:B11)),ROWS(E$2:E2))))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Copy down until you get blanks.
 
Upvote 0
Try this...

Sheet1

ABCDE
1Sales PersonNo of Leads_CountSales Person
2Joseph12_2Jonathan
3John8__Jairam
4Josh8___
5Jamie9___
6Jackie3___
7Johnson10___
8Jonathan0___
9Jagjit7___
10Jairam0___
11Total57___

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:77px;"><col style="width:85px;"><col style="width:29px;"><col style="width:45px;"><col style="width:77px;"></colgroup><tbody>
</tbody>


Enter this formula in D2. This will return the count of records that meet the criteria.

=SUMPRODUCT(--(B2:B11=0))

Enter this array formula** in E2:

=IF(ROWS(E$2:E2)>D$2,"",INDEX(A:A,SMALL(IF(B2:B11=0,ROW(B2:B11)),ROWS(E$2:E2))))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Copy down until you get blanks.

What do you mean copy down until I get blanks? The idea is to produce a list of all people who have 0 leads, benefit the table automatically, if I have to drag the formula down it defeat the purpose of what i'm trying to achieve :P

Also what is the count columns for? I'd don't get its purpose, when i tried it it said 1 on my sheet :/

Appricate the help btw, sorry if I'm being stupid!
 
Upvote 0
A1, control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF('[Team sheet.xlsx]Steves Team'!$C$5:$C$14=0,1))

A2, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF(ROWS($A$2:A2)<=$A$1,INDEX('[Team sheet.xlsx]Steves Team'!$B$5:$B$14,
  SMALL(IF(MATCH('[Team sheet.xlsx]Steves Team'!$C$5:$C$14=0,
   ROW('[Team sheet.xlsx]Steves Team'!$C$5:$C$14)-
    ROW('[Team sheet.xlsx]Steves Team'!$C$5)+1),ROWS($A$2:A2))),"")

a1) returns a count of 2, i need the names to be displayed for people with 0 leads.
a2) doesn't work for some reason, and i dont want to drag code to copy, should be done automatically
 
Upvote 0
What do you mean copy down until I get blanks? The idea is to produce a list of all people who have 0 leads, benefit the table automatically, if I have to drag the formula down it defeat the purpose of what i'm trying to achieve :P

Also what is the count columns for? I'd don't get its purpose, when i tried it it said 1 on my sheet :/

Appricate the help btw, sorry if I'm being stupid!
Things just don't happen automatically! We have to tell Excel what we want and one way we do that is through formulas.

The count tells us how many records there are that meet the criteria. We use this as an error trap. We compare the number of rows the formula is copied to the this number.

Since we don't know how many records there could be we need to copy the formula to enough cells that ensures we get all the results.
 
Upvote 0

Forum statistics

Threads
1,215,841
Messages
6,127,221
Members
449,371
Latest member
strawberrish

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