+ Reply to Thread
Results 1 to 6 of 6

Lookup function

  1. #1
    Registered User
    Join Date
    07-01-2011
    Location
    Finland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Lookup function

    Hello,

    I cant seem to figure out how the lookup funtion works.

    Table for the example is described in the attachment.

    And i am trying to use =LOOKUP(100;A1:D1;A2:D2). I am expecting to get the value 940 as result but the function gives value 1200 to me as result. Cant understand why? Could someone explane why? I thought that the fuction would search the largest number at row 1 and return the value corresponding to it from row 2.

    Cheers for your help!
    -Steely
    Attached Images Attached Images

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

    Re: Lookup function

    Because 100 is largest. It will look all the way to the end of row and return last number (since 100 never reached). So last number is 0 which is 1200 in second row.
    Never use Merged Cells in Excel

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: Lookup function

    But since there are 0's you will always get last value...

    in this array:

    Please Login or Register  to view this content.
    this would be results:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-01-2011
    Location
    Finland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Lookup function

    I see. I thought that the function would always lookup the largest value of the group selected. Um what would be the best fucktion to use in the case presented to look for the largest value and get the value corresponding to it?

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: Lookup function

    something like this:

    =INDEX(C4:G4, MATCH(MAX(C3:G3), C3:G3, 0))

  6. #6
    Registered User
    Join Date
    07-01-2011
    Location
    Finland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Lookup function

    Okay. Thanks a lot for 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.6.0 RC 1