View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Conditional Concatenate

=if(B2,A2,"")&if(B3,A3,"")&if(b4,A4,"")&if(B5,A5," ")&if(B6,A6,"")

Concatenation is supported by array formulas if that is what you were hoping
for. Laurent Longre has a free addin which provides this capability:


http://xcell05.free.fr/

look for Morefunc.xll

--
Regards,
Tom Ogilvy



"ExcelMonkey" wrote:

Can anybody tell me how to do a conditional concatenate. I have to columns
of data. Column A has numbers: 1-5 (A2:A6). Column B has booleans:
TRUE/FALSE (B2:B6)

A B
1 TRUE
2 FALSE
3 TRUE
4 FALSE
5 TRUE

in B7 I want to do an conditional concatenate using "&" character on column
A using the booleans in column B. The result would like like this: &1&3&5.
Note there is a "&" before the first number as well.

Thanks