+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : vlookup combined with concatenation?

  1. #1
    Registered User
    Join Date
    06-25-2012
    Location
    melbourne
    MS-Off Ver
    Excel 2007
    Posts
    2

    vlookup combined with concatenation?

    2ASH Ashfield ASHF 2ALB 3831 1 14750 Leeton (A) Berrigan (A) Alpine (S) Indigo (S) Berrigan (A) Moira (S)
    2ASH Ashfield ASHF 2ALB 1605 1 10650 Berrigan (A) Alpine (S) Indigo (S) Berrigan (A) Moira (S)
    2ASH Ashfield ASHF 2ALB 1964 2 20110 Alpine (S) Indigo (S) Berrigan (A) Moira (S)
    2ASH Ashfield ASHF 2ALB 1565 2 23350 Indigo (S) Berrigan (A) Moira (S)
    2ASH Ashfield ASHF 2ALB 3708 1 10650 Berrigan (A) Moira (S)
    2ASH Ashfield ASHF 2ALB 3708 2 24900 Moira (S)

    From the above list, collumn 8 shows the australian councils that are associated with 2ASH.
    I would like to be able to do a vlookup for 2ash and get all the councils associated with 2 ASH in one cell on another worksheet.

    I have lined up horizontally using a simple formula and then tried to concatenate several vlookups in one cell:
    vlookup(2ash, data, row1) & vlookup(2ash, data, row2), & vlookup(2ash, data, row3), etc., but to no avail.

    There must be a better solution?

    Many thanks in advance,

    Erik

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: vlookup combined with concatenation?

    Can you upload example workbook?

  3. #3
    Registered User
    Join Date
    06-25-2012
    Location
    melbourne
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: vlookup combined with concatenation?

    here's an example source and desired output page, many thanks in advance
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    06-10-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    341

    Re: vlookup combined with concatenation?

    Hi Vulpen,

    I can't take much credit for this, its something another user produced for a different problem and I adjusted slightly for yours:

    Create a macro and put this in the code:
    Please Login or Register  to view this content.
    Now on your Output sheet:
    Put next to each entry (i.e. 6CAN)
    =aconcat(IF(Source1!B1:Source1!B99="6CAN",Source1!I1:Source1!I99,""))
    CTRL+SHIFT+ENTER (don't just ENTER)

    You can further automate it by say if Output!B6 is 6CAN, put formula in Output!C6 as
    =aconcat(IF(Source1!B1:Source1!B99=C6,Source1!I1:Source1!I99,""))
    CTRL+SHIFT+ENTER (don't just ENTER)

    That way you can copy up/down next to your code column and get all the desired outcomes.

    Hope that helps!

    -
    Remember to mark the thread SOLVED if your problem has been taken care of and to award rep points via the star-like icon

+ 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