Concatenate Column A if X is Column B and Y is in Column C

dmcgetti

Board Regular
Joined
Feb 16, 2015
Messages
66
I have a list of invoice numbers in column A, customer names in column B, and part numbers in column C.

I need to combine invoice nummbers to one cell depending on part number for each customer.

123SHOP ABCPART X
456SHOP ABCPART X
789SHOP XYZPART X
987SHOP ABCPART Y
654SHOP ABCPART W
321SHOP XYZPART Y

<tbody>
</tbody>

So if I am Looking for Shop ABC's invoices for Part X the cell would read "123 456"

Thanks as always!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
In D1 control+shift+enter, not just enter, and copy down:

=TEXTJOIN(" ",TRUE,IF($B$1:$B$6=B1,IF($C$1:$C$6=C1,$A$1:$A$6,""),""))

Hope this is what you are looking for.
 
Upvote 0
This works for 2 matches - will there be more?
J​
K​
L​
M​
2​
123​
SHOP ABCPART X123 456
3​
456​
SHOP ABCPART X
4​
789​
SHOP XYZPART X
5​
987​
SHOP ABCPART Y
6​
654​
SHOP ABCPART W
7​
321​
SHOP XYZPART Y321 321
M2=IFERROR(J2&" "&INDEX($J3:$J$7,MATCH(K2&" "&L2,INDEX($K3:$K$7&" "&$L3:$L$7,0),0)),"")
copied down
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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