+ Reply to Thread
Results 1 to 3 of 3

VLOOKUP with a number of outcomes horizontal

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    VLOOKUP with a number of outcomes horizontal

    I know this comes up loads and am sorry to ask but if anyone could help me that would be great!


    So list shops with list of codes. There is often more than one code in each shop but I need them to be moved into one row.

    See attached for example sheet

    But basically I have

    Shop / Code
    A / 1
    A / 2
    B / 3
    C / 2
    C / 4


    And I need:

    Shop / Code 1 / Code 2
    A / 1 / 2
    B / 3
    C / 2 / 4

    I've been using a formula like this =IF(ISERROR(INDEX($A$1:$B$7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1)),2)),"",INDEX($A$1:$B$7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1)),2))

    Which works vertically, problem is I need it horizontally

    Any help would be gratefully received

    examplea.xlsx

  2. #2
    Registered User
    Join Date
    01-08-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: VLOOKUP with a number of outcomes horizontal

    I got this to work:

    =INDEX($A$2:$B$31, SMALL(IF($A2=$A$2:$B$31, ROW($A$2:$B$31)-MIN(ROW($A$2:$B$31))+1, ""), COLUMN(A1)),2)

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: VLOOKUP with a number of outcomes horizontal

    Pl see attached file.
    Attached Files Attached Files

+ 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