View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Concatenation and skipping blank cells

I think I'd use a UDF, too. But that formula could be modified for cells with
multiple words:

=SUBSTITUTE(SUBSTITUTE(TRIM(SUBSTITUTE(A1," ",CHAR(1))
&" "&SUBSTITUTE(B1," ",CHAR(1))
&" "&SUBSTITUTE(C1," ",CHAR(1))
&" "&SUBSTITUTE(D1," ",CHAR(1))
&" "&SUBSTITUTE(E1," ",CHAR(1))
&" "&SUBSTITUTE(F1," ",CHAR(1)))," ",", "),CHAR(1)," ")

But it gets kind of ugly kind of fast.

Ron Rosenfeld wrote:

On Mon, 29 May 2006 14:43:02 -0500, Dave Peterson
wrote:

Are all the values in A1:F1 single words--no spaces?

If yes:

=SUBSTITUTE(TRIM(A1&" "&B1&" "&C1&" "&D1&" "&E1&" "&F1)," ",", ")



Neat solution for single word entries!

--ron


--

Dave Peterson