+ Reply to Thread
Results 1 to 5 of 5

Thread: Concatenation of Text in Arrays with reference cells

  1. #1
    Registered User
    Join Date
    11-29-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    5

    Concatenation of Text in Arrays with reference cells

    Hi,

    Please help with the below.

    I want to concatenate the Values in an array based on a reference cell.
    For example if Column A and B have the following values.. I want to concatenate the vlaues of Array B for A1 in cell C1.

    In other words from the below list I want to concatenate all the matching fruits in column B tagged to each digit in Column A and this concatenated value to be available in Column C for each reference cell.

    For easy reference I have attached a sample file. XLSX


    A B C(Desired Result)
    1 Apple Apple,Orange,Pine
    1 Apple Apple
    3 Orange Orange,Peach
    4 Pine Pine,Peach
    5 Peach Peach
    6 Peach Peach
    2 Pine Pine
    3 Peach Orange,Peach
    4 Peach Pine,Peach
    1 Orange Pine,Peach
    1 Pine Pine,Peach
    Attached Files Attached Files
    Last edited by boscoamd; 11-30-2011 at 05:26 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    MS Office Excel 2007
    Posts
    841

    Re: Concatenation of Text in Arrays with reference cells

    I think your example spreadsheet is wrong, or maybe you could explain

    This bit is fine. C2 contains Apple Orange Pine since A2 contains 1 and B2 is Apple, A11 also contains 1 and B11 is Orange and A12 contains 1 and B12 is Pine. So your concatenating the fruits where there is a 1 in column A (and presumably deduplicating else C3 would contain Apple Apple Orange Pine).

    Since A11 contains 1 shouldn't C11 also contain Apple Orange Pine?
    Same goes for C12 shouldnt that be Apple Orange Pine as well?
    Also C3 Apple Orange Pine?
    Regards
    Special-K

    I rarely return to a problem once I've answered it so make sure you clearly define what the trouble is.

  3. #3
    Registered User
    Join Date
    11-29-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Concatenation of Text in Arrays with reference cells

    Hi,

    Yes you are right. I think I have overlooked it. find below the desired result I am looking for.
    will re attach the excel with correct Data.

    Digits Frutis Desired Result1 Or Desired Result2
    1 Apple Apple,Apple,Orange,Pine Apple,Orange,Pine
    1 Apple Apple,Apple,Orange,Pine Apple,Orange,Pine
    3 Orange Orange,Peach Orange,Peach
    4 Pine Pine,Peach Pine,Peach
    5 Peach Peach Peach
    6 Peach Peach Peach
    2 Pine Pine Pine
    3 Peach Orange,Peach Orange,Peach
    4 Peach Pine,Peach Pine,Peach
    1 Orange Apple,Apple,Orange,Pine Apple,Orange,Pine
    1 Pine Apple,Apple,Orange,Pine Apple,Orange,Pine

  4. #4
    Registered User
    Join Date
    11-29-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Concatenation of Text in Arrays with reference cells

    Have attached the Reworked Excel.
    Attached Files Attached Files

  5. #5
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,788

    Re: Concatenation of Text in Arrays with reference cells

    here is one way
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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.2.0