A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Concatenate Text... with spaces



 
 
Thread Tools Display Modes
  #1  
Old September 11th 08, 02:47 PM posted to microsoft.public.excel.worksheet.functions
Leslie W.
external usenet poster
 
Posts: 5
Default Concatenate Text... with spaces

I'm having a problem, and I don't know if there's a solution in the form of
an Excel function. I believe I could write a VB Macro to accomplish what I
need to do, but I can't use macros for this application.

I have a Dataset that looks like this:
John Smith
<blank cell>
Jane Doe
John Doe
<blank cell>
Jane Smith

I need it to concatenate as John Smith, Jane Doe, John Doe, Jane Smith

I have the MCONCAT function, which works, but it does not solve the blank
cell problem. I have also tried the formula suggested by Toothless Mama in
the past, but that doesn't help me with the space.

Any suggestions would be appreciated!

Thanks!
Ads
  #2  
Old September 11th 08, 02:59 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 11,501
Default Concatenate Text... with spaces

Leslie,

MCONCAT does solve the spaces problem

=MCONCAT(A1:A6," ")

Returns
John Smith Jane Doe John Doe Jane Smith

Mike


"Leslie W." wrote:

> I'm having a problem, and I don't know if there's a solution in the form of
> an Excel function. I believe I could write a VB Macro to accomplish what I
> need to do, but I can't use macros for this application.
>
> I have a Dataset that looks like this:
> John Smith
> <blank cell>
> Jane Doe
> John Doe
> <blank cell>
> Jane Smith
>
> I need it to concatenate as John Smith, Jane Doe, John Doe, Jane Smith
>
> I have the MCONCAT function, which works, but it does not solve the blank
> cell problem. I have also tried the formula suggested by Toothless Mama in
> the past, but that doesn't help me with the space.
>
> Any suggestions would be appreciated!
>
> Thanks!

  #3  
Old September 11th 08, 03:21 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,718
Default Concatenate Text... with spaces

Try this:

=SUBSTITUTE(MCONCAT(IF(A1:A6<>"",A1:A6&", ","")),",","",COUNTA(A1:A6))

ctrl+shift+enter, not just enter


"Leslie W." wrote:

> I'm having a problem, and I don't know if there's a solution in the form of
> an Excel function. I believe I could write a VB Macro to accomplish what I
> need to do, but I can't use macros for this application.
>
> I have a Dataset that looks like this:
> John Smith
> <blank cell>
> Jane Doe
> John Doe
> <blank cell>
> Jane Smith
>
> I need it to concatenate as John Smith, Jane Doe, John Doe, Jane Smith
>
> I have the MCONCAT function, which works, but it does not solve the blank
> cell problem. I have also tried the formula suggested by Toothless Mama in
> the past, but that doesn't help me with the space.
>
> Any suggestions would be appreciated!
>
> Thanks!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
remove spaces in front of text dolphin Excel Discussion (Misc queries) 2 October 8th 08 05:30 PM
extract text between two spaces anthony Excel Discussion (Misc queries) 4 February 20th 07 02:31 PM
How do I delete spaces from the end of text George Excel Discussion (Misc queries) 4 September 11th 06 07:33 AM
how to erase all spaces in text cell? D Excel Worksheet Functions 3 May 23rd 06 08:41 AM
Replacing spaces in text, with another character PCLIVE Excel Worksheet Functions 2 October 14th 05 06:43 PM


All times are GMT +1. The time now is 07:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.