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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
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,190,917
Messages
5,983,576
Members
439,852
Latest member
balasat

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
Top