+ Reply to Thread
Results 1 to 6 of 6

forumla to separate values with semicolon

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    forumla to separate values with semicolon

    I have a list of values in column A and I need to get them in a list of values, separated by a semicolon. For example: Column A has dog in A1, cat in A2, and bird in A3. I'd like to get the following in B1: dog;cat;bird

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: forumla to separate values with semicolon

    you could use text to columns and then select ; as your deliminator

    or if you need a formula

    put this in B1 then drag

    Please Login or Register  to view this content.
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  3. #3
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: forumla to separate values with semicolon

    oh sorry i just realised you were putting it together not splitting it

    use the & symbol to put the word together

    like this

    Please Login or Register  to view this content.
    etc

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: forumla to separate values with semicolon

    if you have a long list (A1:Axxx), you can try this:

    in cell b1, enter: =A1
    in cell b2, enter: =IF(ISBLANK(A2),"",B1&";"&A2)

    fill that formula down for as many rows as you have. The last row with a result would be the string formatted like you want.

    I am thinking a VBA loop would handle this much more simply. If only I knew VBA.

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: forumla to separate values with semicolon

    kuder mcgavin,

    Just in case you're ok with a UDF, you can use the ConcatAll UDF I posted here
    http://www.excelforum.com/tips-and-t...geravatar.html

    Then in B1, you could use this formula:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: forumla to separate values with semicolon

    Here's some VBA I found that seems to work (Insert a new module and paste this code):
    Please Login or Register  to view this content.
    So if your list is in A1:Axxx, then in cell B1 you can enter: =ConcRange(A1:Axxx)

    Of course, you can set the 'xxx' part of the range to a row that your list would never go down to (100, 1000, whatever...)

    - Vince

+ 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