Return a list based off of values in another column

medeirad

New Member
Joined
Aug 14, 2017
Messages
7
Hi All,

I'm looking to get a list of values based off of information in another column. See the fictitious table below. In the first column are sequential order #'s and in the second column are the clients' names.

I'd like to pull the list of values in column A based on the client in column B.

Order #Client
HDS17-1CLIENT2
HDS17-2CLIENT1
HDS17-3CLIENT2
HDS17-4CLIENT2
HDS17-5CLIENT1
HDS17-6CLIENT1
HDS17-7CLIENT1
HDS17-8CLIENT2

<tbody>
</tbody>

Thank you!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
In case I scared anyone off all I'm looking for is a formula that will provide list of numbers in column A that have CLIENT1 in Column B
 
Upvote 0
Row\Col
A​
B​
C​
D​
E​
F​
1​
Order # ClientCLIENT1
2​
HDS17-1 CLIENT2
4​
3​
HDS17-2 CLIENT1
4​
HDS17-3 CLIENT2HDS17-2
5​
HDS17-4 CLIENT2HDS17-5
6​
HDS17-5 CLIENT1HDS17-6
7​
HDS17-6 CLIENT1HDS17-7
8​
HDS17-7 CLIENT1
9​
HDS17-8 CLIENT2
10​

In F2 just enter:

=COUNTIFS($B$2:$B$9,F$1)

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

=IF(ROWS(F$4:F4)>F$2,"",INDEX($A$2:$A$9,SMALL(IF($B$2:$B$9=F$1,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(F$4:F4))))
 
Upvote 0
Try this...
A​
B​
C​
D​
1​
Order #ClientClient1
2​
HDS17-1CLIENT2HDS17-2
3​
HDS17-2CLIENT1HDS17-5
4​
HDS17-3CLIENT2HDS17-6
5​
HDS17-4CLIENT2HDS17-7
6​
HDS17-5CLIENT1
7​
HDS17-6CLIENT1
8​
HDS17-7CLIENT1
9​
HDS17-8CLIENT2
D1 is the selected client
D2=IFERROR(INDEX(A:A,SMALL(IF($B$2:$B$9=$D$1,ROW($A$2:$A$9)),ROWS($A$1:A1))),"")
"Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try to enter the {} manually yourself."
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}. Note: Do not try to enter the {} manually yourself.
then copy down as needed
 
Upvote 0
Give this a try,
where your two lists are in columns A & B,
a drop down in cell D1 with all the clients names as in the list in column B,
this array formula in cell E1.

=IFERROR(INDEX($A$2:$A$11,SMALL(IF($B$2:$B$11=$D$1,ROW($B$2:$B$11)-ROW($B$2)+1),ROWS(E$1:E1))),"")

To enter the formula, hold down Ctrl + Shift and hit Enter, Excel will encase the formula in { } 's, do not enter them yourself.
Now pull down as far as needed to 'capture' all A column items. You can have the formula pulled waaay past the last entry shown in the E column and the IFERROR will return "nothing".

Re-select a client name in D1 and the E column list will up date.

If you make changes to the formula, always remember to ARRAY ENTER each time.

You may note that all range references are set to absolute $x$1 except ROWS(E$1:E1))).
Check the formulas further down in E column and see the natural advancement.

Howard
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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