+ Reply to Thread
Results 1 to 3 of 3

Horizontal lookup that returns value from top row

  1. #1
    Registered User
    Join Date
    02-14-2014
    Location
    Alexandria, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Horizontal lookup that returns value from top row

    I have a table as such:

    2000, 2001, 2002
    Sean, Billy, Thomas
    Jean, Lisa, Amy
    Tina, , Grover

    I want to use HLOOKUP to search for a name in the table and return the year (which resides in the first row) if a match is found. All the online help I've found for HLOOKUP looks for an item in the first row and returns something from the column below, but this doesn't quite do the trick. INDEX MATCH only seems to work for vertical lookups. Any idea if/how I can accomplish what I'm looking for? Thanks in advance.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Horizontal lookup that returns value from top row

    Hi,

    Just as VLOOKUP requires the value being looked up to be in the first column, HLOOKUP expects it to be in the first row.
    Therefore use

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Horizontal lookup that returns value from top row

    Assuming years in A1:C1
    Names in A2:C4
    Try this array formula for, i.e "Lisa":

    =MAX((A2:C4="Lisa")*A1:C1)



    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Quang PT

+ 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. [SOLVED] VBA Vertical and horizontal Lookup ???
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-07-2014, 06:15 PM
  2. [SOLVED] Horizontal and Vertical Lookup
    By kingkong321 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2014, 06:48 AM
  3. [SOLVED] Lookup a vertical and horizontal value
    By KARENKERBA in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2013, 04:33 PM
  4. Horizontal and Vertical lookup.
    By rlsublime in forum Excel General
    Replies: 3
    Last Post: 09-05-2012, 05:54 PM
  5. Sumproduct and horizontal lookup
    By Gingit in forum Excel General
    Replies: 3
    Last Post: 06-12-2006, 08:10 PM

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