+ Reply to Thread
Results 1 to 4 of 4

Combine Several Cells into a New Cell Based on Criteria

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Combine Several Cells into a New Cell Based on Criteria

    Hello all,

    I am hoping someone could help me with my current data. I will try to explain this as best as I can. I am working in Excel 2007.

    I have two columns, A and B, with data where the first column contains a cell with one name and the second column contains several cells with a description of the name. The description matches to the name and all the blank cells under the name. For example:

    Name 1 Descrption 1,
    Descrption 2
    Name 2 Descrption 1,
    Descrption 2,
    Descrption 3

    I have over 1000 names that also have the description cells in the second column but divided into several cells ranging from 1 cell to 4 cells. I need the description cells text to be merged into one cell aligned with the name in column C with a space added between each description. For example:

    Name 1 Descrption 1, Descrption 1, Description 2
    Descrption 2
    Name 2 Descrption 1, Descrption 1, Descrption 2, Descrption 3
    Descrption 2,
    Descrption 3

    Essentially I need a macro that looks at column A's "Name" and all the blanks under that name, then copies all the text parallel to those cells in column B to column C aligned with the "Name". I need the macro to do this for every name available. If anyone could help me accomplish this, it would be extremely appreciated.

    Thank you

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Combine Several Cells into a New Cell Based on Criteria

    I don't know how to modify this User Defined Function (UDF) and it is not mine, but it should do what you want.

    You'll have to fix column A.

    http://www.mrexcel.com/forum/excel-q...tml#post830620
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Combine Several Cells into a New Cell Based on Criteria

    Thank you very much jeffreybrown, that is exactly what I needed to accomplish this. I did have to fix my column A but after that it worked great!

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Combine Several Cells into a New Cell Based on Criteria

    So glad to hear it worked out for you and you're welcome. Thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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