Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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!

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
extract text between two spaces anthony Excel Discussion (Misc queries) 5 April 21st 23 05:24 PM
remove spaces in front of text dolphin Excel Discussion (Misc queries) 2 October 8th 08 05:30 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 02:10 PM.

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

About Us

"It's about Microsoft Excel"