+ Reply to Thread
Results 1 to 4 of 4

How to do HLOOKUP and return information vertically? FILE ATTACHED....

  1. #1
    Registered User
    Join Date
    01-20-2016
    Location
    USA!
    MS-Off Ver
    Office 2010
    Posts
    62

    How to do HLOOKUP and return information vertically? FILE ATTACHED....

    Hi all, I have a list of Toyota car names (Column A) and in subsequent columns, I have model years for each of the car names. Some car names have 10 or 11 model years, some only 1 or 2. I want to be able to display the data dynamically in a purely vertical display.

    I have the file attached, with the first tab the way the information is currently laid out, and a second tab showing what how I want to display it (did it for first two car names).

    The only catch is though, I need it to be dynamic. As it is currently laid out, the names and years are dynamic in a separate report. But displaying it vertically is the challenge here. I would prefer a formula though.

    Any help is appreciated!!! Thank you y'all....
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,895

    Re: How to do HLOOKUP and return information vertically? FILE ATTACHED....

    Since you have Office 2010. Are you able to download and install PowerQuery? This will be easiest to maintain and more robust than other methods.

    Steps:
    1. Add headers to all columns with data. (i.e. Year1 in B1 then drag it over to Column L in your sample).
    2. Convert range to Excel Table
    3. Using PowerQuery, load from Table/Range, and hit Edit.
    4. Once in PQ editor, select Year1 to Year11 columns.
    5. Right click and hit "Unpivot"
    6. Remove "Attribute" column and rename other columns appropriately.
    7. Load result to either existing sheet or new sheet. Done.

    Edit: Have a read of link for how to install PowerQuery.
    https://www.excelcampus.com/install-power-query/
    Last edited by CK76; 05-07-2018 at 03:16 PM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    01-20-2016
    Location
    USA!
    MS-Off Ver
    Office 2010
    Posts
    62

    Re: How to do HLOOKUP and return information vertically? FILE ATTACHED....

    Sorry CK76, I should have updated it. I am running Office 2016....is there a formula that can do this? I need something a bit more automated....

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,895

    Re: How to do HLOOKUP and return information vertically? FILE ATTACHED....

    PowerQuery comes standard with Office 2016, but now called "Get & Transform". It replaces legacy Get External Data (i.e. MS Query).

    PQ can be automated far better than formula (with minor change to accommodate for column extending beyond Column L), after initial setup.

    What's the maximum number of columns needed?

    Another option is using VBA. But it will be harder to maintain if some condition changes (as it has no UI and does not preserve intermediate steps like PQ does).

+ 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. Replies: 0
    Last Post: 09-11-2015, 01:04 PM
  2. Return multiple values vertically looking up one value
    By holdeng in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2014, 11:53 AM
  3. lookup to return multiple values? (file attached)
    By clockhart10 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2013, 03:51 PM
  4. Replies: 0
    Last Post: 12-08-2010, 01:02 PM
  5. Replies: 3
    Last Post: 10-02-2008, 09:27 AM
  6. Replies: 7
    Last Post: 09-12-2006, 10:39 PM

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