+ Reply to Thread
Results 1 to 7 of 7

Combine data in two cell into one

  1. #1
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Combine data in two cell into one

    Hello,

    Similar thread match with my problem should be solved on somewhere in the forum.
    But i can't find it.

    I want to combine two cells single cell, it's like permutation/combination i am not sure.
    example:

    cell1 cell2 cell3

    A 1 A1
    B 1,2 B1,B2

    Is it any efficient formula? i am think using subtitute function,

    =CELL1&SUBSTITUTE(CELL2,",",","&CELL1) but not work well for data more than one in cell1 and cell2

    please check attached file.

    Thank you.
    Attached Files Attached Files
    Last edited by qiyusi; 12-22-2015 at 10:04 PM.

  2. #2
    Forum Contributor
    Join Date
    05-23-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Combine data in two cell into one

    Hello Qiyusi,

    Even without viewing your file, have you tried the Concatenate function?

    Please Login or Register  to view this content.
    You can even put words not in the cells or spaces between cells by placing them within quotes (see below):

    Please Login or Register  to view this content.
    If a1 = Isn't this

    B1= This will likely solve

    C1= Your problem

    With that code it would read:

    Isn't this Nifty Eh? This will likely solve Your problem


    Also, you can write a large number of formulas this way if you use concatenate to combine the pieces, then copy and Paste Special> Paste Values. This will take the result of the concatenate formula and make it plain text (no longer in a formula).

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Combine data in two cell into one

    here's a macro solution if you're open to macros

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

  4. #4
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: Combine data in two cell into one

    @liquidmettle: Thank you for your reply, how ever this is not simple concatenate problem.

    @Crooza: Perfect!!! exactly what i need. And yes, i open to macro solution.

    Thank you!

  5. #5
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: Combine data in two cell into one

    Crooza,

    Just one last question,

    is it possible to add space [ ] between combine data: example B[space]1,B[space]2 rather than B1,B2?

  6. #6
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Combine data in two cell into one

    I haven't tested this but try changing this line

    finalstring = finalstring & list1(i) & list2(j) & "," to this

    finalstring = finalstring & list1(i) & " " & list2(j) & ","

    Let me know if this isn't what you want and I'll look at it again

  7. #7
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: Combine data in two cell into one

    Great! it works like a charm

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to combine cell data?
    By charkins in forum Excel General
    Replies: 5
    Last Post: 04-29-2014, 06:14 PM
  2. Replies: 8
    Last Post: 11-25-2013, 10:26 PM
  3. Replies: 4
    Last Post: 02-01-2013, 01:15 AM
  4. Replies: 8
    Last Post: 07-05-2012, 11:27 AM
  5. Combine data from one cell to another based on duplicate data in another cell
    By bzenker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-15-2011, 01:09 AM
  6. Replies: 1
    Last Post: 01-29-2010, 12:52 AM
  7. How to combine the data in a row into one cell.
    By excelgenius in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-17-2009, 07:23 AM

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