ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If Statement Question (https://www.excelbanter.com/excel-worksheet-functions/17140-if-statement-question.html)

carl

If Statement Question
 
I have a table that looks like so:

COLA COLB
1 AB
2 CD
1 EF
1 GH
2 IJ
2 KL

I would like to use the MCONCAT(A2:A6,",") formula to look at COLA and if
equal to 1, concat those but if equal to 2 do nothing.

Like this:

AB,EF;GH



Michael

Hi Carl
One way:
Put in an extra column and insert the following formula
=IF(A1=1,B1,"").......copy down as far as you need.
Then at the bottom of the extra column put
=CONCATENATE(C1,C2,C3,C4,C5,C6).......this function allows for 30 arguments
only!! But you could get around that by breaking it up into groups of 30
lines.
I'm sure the other NG users will come up with a SUMPRODUCT answer but this
might help in the short term.

HTH
Michael

"carl" wrote:

I have a table that looks like so:

COLA COLB
1 AB
2 CD
1 EF
1 GH
2 IJ
2 KL

I would like to use the MCONCAT(A2:A6,",") formula to look at COLA and if
equal to 1, concat those but if equal to 2 do nothing.

Like this:

AB,EF;GH




All times are GMT +1. The time now is 09:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com