Cancatenate Multiple Cells in Rows

slohman

Board Regular
Joined
Mar 31, 2012
Messages
110
Is there a way to concatenate multiple rows if A2:A6 is True then concatenate B2:C6 with DASH into E2 with a COMMA in between.

A1B1C1 E1
TRUESW57Swing Post DoubleSW57 - Swing Post Double, SW84 - St Swing Post Double (electro-polished), etc
TRUESW84St Swing Post Double (electro-polished)
TRUESW84-1St Swing Post Double (Powder-coated)
FALSESW65Swing Post Triple (2+1)
TRUESW130Swing Post 4 Bay Snr/Jnr

<tbody>
</tbody><colgroup><col span="2"><col><col><col></colgroup>

TIA
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Yes, if you have Office 365, TEXTJOIN function will solve this problem very easily.
 
Upvote 0
Thanks could you explain what the formula would need to look like.
 
Last edited:
Upvote 0
The formula looks like:

Code:
=TEXTJOIN(",",,IF(A1:A5,B1:B5,""))

Ctrl shift enter for the array formula.

"," measn the delimiter is ",", TEXTJOIN will concatenate B1:B5 if A1:A5 is TRUE.

formula returns:1,3,4 for below table.

TRUE1
FALSE2
TRUE3
TRUE4
FALSE5

<colgroup><col width="80" span="2" style="width:60pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,174
Members
448,870
Latest member
max_pedreira

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