+ Reply to Thread
Results 1 to 10 of 10

joining two cells including commas

  1. #1
    Registered User
    Join Date
    04-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question joining two cells including commas

    i have problem to joining two cells which also including commas like;

    A B Result(C)
    4 5,6 45
    46
    56 44,2 5644
    562

    like i have two column A and B, column A has a number joining with a two numbers of B column but separated with comma and the result should be the same like in Shown Above.

    Anyone can help me about that.....

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: joining two cells including commas

    Assuming your data starts in A2 and B2, try in C2:

    =IF(A2<>"",A2&LEFT(B2,FIND(",",B2)-1),A1&MID(B1,FIND(",",B1)+1,255))+0

    copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: joining two cells including commas

    Quote Originally Posted by NBVC View Post
    Assuming your data starts in A2 and B2, try in C2:

    =IF(A2<>"",A2&LEFT(B2,FIND(",",B2)-1),A1&MID(B1,FIND(",",B1)+1,255))+0

    copied down.


    The formula above is only working for the field having one comma, but here i have more than 50 commas in one column which i want to joining as well, so what should i do for that.....And also i have random data some fields have no commas and some fields have one commas and some of them more than 50 commas..........

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: joining two cells including commas

    Can you give a better example then of what your column A and B look like now, and what you want the results to look like.

    Post a sample workbook showing before and after.

  5. #5
    Registered User
    Join Date
    04-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: joining two cells including commas

    Quote Originally Posted by NBVC View Post
    Can you give a better example then of what your column A and B look like now, and what you want the results to look like.

    Post a sample workbook showing before and after.


    i have column A and Column B which i want to join like .......column A has a record of 93 or something else and column B has 456,345,234,7898 just like that and the result should be on C which look should be like given below.......
    93456
    93345
    937898
    93234
    joining of two columns separated by commas
    Last edited by jbkhan; 04-19-2011 at 08:20 AM.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: joining two cells including commas

    So assuming data in A and B is set up as per your sample, with spacing between entries.... and assuming you can start in Row 2 (i.e. at A2), then add a helper column.

    At C2 enter:

    Please Login or Register  to view this content.
    and copy down to the bottom. You can hide this column, if desired.

    then at D2 enter:

    Please Login or Register  to view this content.
    and copy down.

  7. #7
    Registered User
    Join Date
    04-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: joining two cells including commas

    sir here again problem coming whn i write the formula of =IF(ISNUMBER(A2),1,C1+1) the result is coming 1 and when i drag it, it only show 1 in all the cells and when i write the other formula then it will show the first digits before the commas and will not shows after the commas digits,,,like it will show

    e.g: column A has 93 and column B has 555, 666, 777 thn it will combining only the first digits of both the column like 93555 and whn i drag it for the other 2 digits then it will show error like #Value

    find also attachement of excel file name PRICE CHANGE.XLS....................
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: joining two cells including commas

    maybe this?
    place this in C1...and drag down
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  9. #9
    Registered User
    Join Date
    04-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: joining two cells including commas

    Quote Originally Posted by jwright650 View Post
    maybe this?
    place this in C1...and drag down
    Please Login or Register  to view this content.


    sir actually i m joining these two columns, column A and B like column A has a record of 787 in one cell and column B has 777, 888, 9999 so these would be in one cell again and the result should be like in three rows in column C like.
    787777
    787888
    7879999
    to joining two columns separated by commas,,,the column A has no commas and the column B has more than 50 commas in one cells....so splitting these cells into rows by joining with the ColumnA.........

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: joining two cells including commas

    My formulas were based on your original setup that you removed as I posted my solution.

    It was based on you have placed the column A values at intervals equal to the number of comma separated values in column B.

    I am not sure of an efficient, non-VBA solution right now....

+ 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