Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old September 11th 08, 02:47 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2007
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!

  #2   Report Post  
Old September 11th 08, 02:59 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2007
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   Report Post  
Old September 11th 08, 03:21 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2006
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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 01: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:57 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017