MrExcel Publishing
Your One Stop for Excel Tips & Solutions

concatenation of arrays

Posted by banister on August 07, 2001 5:59 PM

Is there any way to concatenate an array?

A1:A4 = "a", "b", "c", "d"
B1:B4 = 1,2,1,2

In it's simplest form, I just need to know how to do an equivalent to
giving: "abcd"
[which doesn't actually work.]

In the end, I want to do the equivalent of
{=concatenate(if(B1:B4=1, A1:A4, " "))}
giving: "a c "
[which also doesn't actually work]

Posted by Ian on August 08, 2001 6:16 AM

Surely a lookup will do this job

Posted by Aladin Akyurek on August 08, 2001 11:54 AM

Re: Surely a lookup will do this job

Judging from the example I don't think so, where there are 2 different letters that are associated with a single value (1 -> a & 1 -> c).

That's right. Concatenate gets just feeded with {"a";"b";"c";"d"}, a single arg that it returns (untouched).

For the same reason as above, this time the arg is {"a";" ";"c";" "}.

Only thing that I can think of is using an additional column (I reckon you're not looking for that) where you can use CONCATENATE or the & operator.