+ Reply to Thread
Results 1 to 5 of 5

Thread: HLookup question

  1. #1
    Registered User
    Join Date
    11-18-2011
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    2

    HLookup question

    Any help would be greatly welcome.

    I'm trying to use the Hlookup function and think I'm doing something wrong but I can't figure out what.

    Row 1 contains a series of numbers
    Rows 2 - 385 also contain a series of numbers

    I'm trying to search for the largest number in each row from row 2 on and then kickout the number in row 1 that is in the same column as the maximum value in each remaining row.

    For example (Commas separating values)

    Row 1
    1,2,3

    Row 2
    1888, 454, 577

    Row 3
    666, 999, 35860

    I would want to report "1" for row 2 and "3" for row 3 with hlookup

    I've been trying to use this for row 2:

    =HLOOKUP(MAX(A2:C2),$A$1:$C$3,1)

    And this for row 3:

    =HLOOKUP(MAX(A3:C3),$A$1:$C$3,1)

    But I keep kicking out "3" as the value for both

    Thoughts?

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,057

    Re: HLookup question

    You can't use HLOOKUP here because HLOOKUP must lookup a value in the first row of the range, which you don't want, try INDEX/MATCH

    =INDEX(A$1:C$1,MATCH(MAX(A2:C2),A2:C2,0))
    Audere est facere

  3. #3
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127

    Re: HLookup question

    Please post in the appropriate forum. This is an XL question I gather?

    I will move it for you this time
    Quoting entire posts clutters the forum and makes threads hard to read !

    If you are pleased with a member's answer then use the Star icon to rate it

    Click here to see forum rules

  4. #4
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,592

    Re: HLookup question

    Try this
    =MATCH(MAX(A1:C1),A1:C1,0)
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

  5. #5
    Registered User
    Join Date
    11-18-2011
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: HLookup question

    Quote Originally Posted by arthurbr View Post
    Please post in the appropriate forum. This is an XL question I gather?

    I will move it for you this time
    Thank you so much for moving the thread. I thought I had placed it in the most appropriate forum but I see I was wrong. Sigh.

    Daddylonglegs: The index function worked great!

    Thanks for all the help =)

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