Return a list of matches

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi,

Have you tried using the Advanced filter in excel? This will generate a new list of results depending on a criteria you determine.

Can you show an example of what you are trying to achieve?
 
Upvote 0
It's simple:

A;B;C;D
3;5;6;1
6;2;4;6
2;6;7;8

I want to return the list of A that have C= 6 or 4
So I want the list of A=3 and A=6

But this list in different files, may be 0 entries or 5 or 100.
How do I return this dynamic list?

I was wondering if I can use INDEX/MATCH and somehow return the first, second, third instance so that my vertical list will be populated by the entries and will go as down as needed each time.

But I don't think that is possible, any other solution?
 
Upvote 0
ABCDc
35616
62464
2678list
6
4

<tbody>
</tbody>

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

=IFERROR(INDEX($A$2:$D$4;SMALL(IF(ISNUMBER(MATCH(INDEX($A$2:$D$4;0;MATCH($G$1;$A$1:$D$1;0));$G$2:$G$3;0));ROW($A$2:$D$4)-ROW(INDEX($A$2:$D$4;1;1))+1);ROWS($1:1));MATCH($G$1;$A$1:$D$1;0));"")

Note. Replace the semi-colon with comma if you are on an American system.
 
Upvote 0
ABCDc
35616
62464
2678list
6
4

<tbody>
</tbody>

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

=IFERROR(INDEX($A$2:$D$4;SMALL(IF(ISNUMBER(MATCH(INDEX($A$2:$D$4;0;MATCH($G$1;$A$1:$D$1;0));$G$2:$G$3;0));ROW($A$2:$D$4)-ROW(INDEX($A$2:$D$4;1;1))+1);ROWS($1:1));MATCH($G$1;$A$1:$D$1;0));"")

Note. Replace the semi-colon with comma if you are on an American system.

Thanks, I tried to make it a bit simpler but it doesn't work:
{=INDEX(UDE!$B:$B,1,SMALL(IF(AND(UDE!$AC:$AC="Awaiting",OR(UDE!$A:$A="Hubs",UDE!$A:$A="Branches")),ROW(UDE!$B:$B)-MIN(ROW(UDE!$B:$B))+1),$O$4:O4))}
Any help please?
 
Upvote 0
Control+shift+enter, not just enter, and copy down:

=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));$O$4:O4));"")
 
Last edited:
Upvote 0
Control+shift+enter, not just enter, and copy down:

=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));$O$4:O4));"")

Thanks, but I don't want it to work only on UDE!$B$2:$B$400, but on UDE!$B:$B
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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