Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Lookup values

  1. #1
    New Member
    Join Date
    May 2013
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Lookup values

    Hello,

    I have typed the following in Excel :

    =LOOKUP("T",{"M","ta","u","v"})


    why is Excel returning M , shouldn't it return "ta" , since "ta" is closest to T ?


    =LOOKUP("T",{"X","ta","u","v"})


    here Excel is giving me N/A. Shouldn't it return "ta" ?



  2. #2
    MrExcel MVP
    Join Date
    Aug 2010
    Location
    Rio de Janeiro BRAZIL
    Posts
    14,810
    Post Thanks / Like
    Mentioned
    10 Post(s)
    Tagged
    5 Thread(s)

    Default Re: Lookup values

    See
    30 Excel Functions in 30 Days: 16

    Take a look at the topic
    LOOKUP Traps

    M.

  3. #3
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,451
    Post Thanks / Like
    Mentioned
    29 Post(s)
    Tagged
    6 Thread(s)

    Default Re: Lookup values

    Quote Originally Posted by chris93 View Post
    Hello,

    I have typed the following in Excel :

    =LOOKUP("T",{"M","ta","u","v"})


    why is Excel returning M , shouldn't it return "ta" , since "ta" is closest to T ?
    A variant of binary search algorithm leads to the last half consisting of the M cell and since M <= T, we get M.

    =LOOKUP("T",{"X","ta","u","v"})


    here Excel is giving me N/A. Shouldn't it return "ta" ?


    Here the last half consisting of the X cell has a value that is not <= T (i.e., NOT X <= T). Hence #N/A.
    Assuming too much and qualifying too much are two faces of the same problem.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •