+ Reply to Thread
Results 1 to 7 of 7

Concatenate a Range Skip Blanks

  1. #1
    Valued Forum Contributor
    Join Date
    01-02-2004
    Location
    malaysia
    Posts
    342

    Concatenate a Range Skip Blanks

    Hi All,
    I have copied the following codes to create a Function of "Concatenate a Range Skip Blanks". However, I humbly seek help to add "," in between every word and also take away the empty space when there is only 2 words are concatenated. Pls refer to my attachement for easy understanding. Thanks in advance.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by seanyeap; 05-24-2009 at 07:28 PM.

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Concatenate a Range Skip Blanks

    You can simplify the function to this:

    Please Login or Register  to view this content.
    ... and then use =Concat(C2:I2, ", ")
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor
    Join Date
    01-02-2004
    Location
    malaysia
    Posts
    342

    Re: Concatenate a Range Skip Blanks

    It returns as Clear Anodise,,,,,,Passivate when 1st word and last word appear. I want it to return correctly as Clear Anodise,Passivate. Pls help,thanks

  4. #4
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Concatenate a Range Skip Blanks

    Install this function in a standard module:
    Please Login or Register  to view this content.
    It takes no parameters, so it is simply used by giving the function a range:

    =ConCatRange(C2:I2)


    (chuckle)

  5. #5
    Valued Forum Contributor
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2003
    Posts
    314

    Re: Concatenate a Range Skip Blanks

    Try this
    Please Login or Register  to view this content.
    HTH,
    windknife

  6. #6
    Valued Forum Contributor
    Join Date
    01-02-2004
    Location
    malaysia
    Posts
    342

    Re: Concatenate a Range Skip Blanks

    Additional macro:

    Please Login or Register  to view this content.
    Last edited by seanyeap; 05-25-2009 at 05:35 AM.

  7. #7
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Concatenate a Range Skip Blanks

    Sean, be sure to edit that last post aand change those QUOTE tags to CODE tags...

    =====
    The cell in question...I had another thought, rather than calculating that random cell "CC1", you could also recalculate the cell with that formula in it:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1