Return a list of matches

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
592
Office Version
  1. 365
Platform
  1. Windows
Hello

In a file with several columns one of which is the ID column, I want to populate a list of IDs that are specific matches (eg COUNTIF matches).

The problem is that the matches can be 0,1,2,3 etc.

How can I do that?
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
I replaced all instances of B2:B400 with B:B

The formula is:

=IFERROR(INDEX(UDE!$B$2:$B$400,SMALL(IF(UDE!$AC$2:$AC$400="Awaiting",IF(ISNUMBER(MATCH(UDE!$A$2:$A$400,{"Hubs","Branches"},0)),ROW(UDE!$B$2:$B$400)-ROW(INDEX(UDE!$B$2:$B$400,1,1))+1)),ROWS($O$4:O4))),"")

Try replacing with this one. Recall control+shift+enter.
 
Upvote 0
The formula is:

=IFERROR(INDEX(UDE!$B$2:$B$400,SMALL(IF(UDE!$AC$2:$AC$400="Awaiting",IF(ISNUMBER(MATCH(UDE!$A$2:$A$400,{"Hubs","Branches"},0)),ROW(UDE!$B$2:$B$400)-ROW(INDEX(UDE!$B$2:$B$400,1,1))+1)),ROWS($O$4:O4))),"")

Try replacing with this one. Recall control+shift+enter.

Great thanks!

Could you explain me please the bit ROW(UDE!$B$2:$B$400)-ROW(INDEX(UDE!$B$2:$B$400,1,1))+1)) ?
What are we doing there?
Also, why we use ISNUMBER?

Thanks!
 
Last edited:
Upvote 0
OOPS there is a problem.

It seems it does not refresh automatically and it shows repetitions.
Also, it should show 200 matches but it continues beyond that when I drag it down.
 
Upvote 0
Great thanks!

Could you explain me please the bit ROW(UDE!$B$2:$B$400)-ROW(INDEX(UDE!$B$2:$B$400,1,1))+1)) ?
What are we doing there?
Also, why we use ISNUMBER?

Thanks!

This row expression creates an ascending integer vector that runs from 1 to the size of the range it refers to: 1, 2, …, N where N = size of the reference range.

Note that INDEX(Range,1,1) means the first cell of Range.

ISNUMBER is used to evaluate the results MATCH returns. Recall that MATCH returns either an integer (number) or #N/A. ISNUMBER returns TRUE for integers and FALSE for #N/A's.
 
Last edited:
Upvote 0
OOPS there is a problem.

It seems it does not refresh automatically and it shows repetitions.
Also, it should show 200 matches but it continues beyond that when I drag it down.

None of these problems should happen, unless we have an issue here with the whole column references.
 
Upvote 0
None of these problems should happen, unless we have an issue here with the whole column references.

The column is 150,000 entries. This can change any time in different files.
So how can I be sure I have the right range if not specifying the whole column?
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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