+ Reply to Thread
Results 1 to 2 of 2

LOOKUP does not always give the correct result - correct number of vectors etc checked

  1. #1
    Registered User
    Join Date
    09-17-2012
    Location
    Cardiff
    MS-Off Ver
    Excel 2010
    Posts
    1

    Unhappy LOOKUP does not always give the correct result - correct number of vectors etc checked

    the code for the function should look in column A - and from a list, create a result in column C
    it looks like this


    it does give a correct result in the majority of occurances - EXCEPT for a result of L5c, L6c and L7c

    column A is the independent score I input, it is in this case out of a total of 20.

    column B has the following
    =LOOKUP(A1, {0,0.299,3,4,5,7,9,10,12,14,15,16,17,18,19,20,21},{"L3i","L3c","L3s","L4i","L4c","L4s","L5i","L5c","L5s","L6i","L6c","L6s","L7i","L7c","L7s","L8s","LEP"})

    column C is
    =LOOKUP(B1, {"L3i","L3c","L3s","L4i","L4c","L4s","L5i","L5c","L5s","L6i","L6c","L6s","L7i","L7c","L7s","L8i","L8c","L8s","LEP"},{3.165,3.5,3.83,4.165,4.5,4.83,5.165,5.5,5.83,6.165,6.5,6.83,7.165,7.5,7.83,8.165,8.5,8.83,9})

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: LOOKUP does not always give the correct result - correct number of vectors etc checked

    As the help on the function says

    "For the LOOKUP function to work correctly, the data being looked up must be sorted in ascending order. If this is not possible, consider using the VLOOKUP, HLOOKUP, or MATCH functions."

    Your list is not in ascending order. For example, "L5i","L5c" should be "L5c","L5i"
    Cheers
    Andy
    www.andypope.info

+ 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