Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Limitations of VLOOKUP (https://www.askmehelpdesk.com/showthread.php?t=64964)

  • Feb 21, 2007, 11:37 AM
    Amyunimus
    Limitations of VLOOKUP
    I have a column of values that can't be put in ascending order.

    20
    55
    3
    61
    2
    etc.

    I want to lookup another value that corresponds to each of these numbers.

    1 345
    2 568
    3 111
    4 908
    5 786
    etc...

    However, since the lookup values are not ordered, the VLOOKUP function does not return a value if the lookup value is less than its position in the list.

    For example, in the first list "2" would not return a value because it appears 5th on the list, and the function is referencing the array from row 5 and above.

    Is there any way to just get a value that corresponds to the lookup number, ordered or not?

    Thanks!
  • Feb 21, 2007, 11:54 AM
    ScottGem
    The order of the value being looked up doesn't matter. The syntax of the VLookup is:

    VLookup(value, range, offset)

    The range is the table you are looking up with the first column being the value to lookup and the second or subsequent columns being the value to return.

    So, if the lookup value is 2, then the function will return 568.
  • Feb 21, 2007, 12:01 PM
    Capuchin
    I agree with scott here, I don't remember it needing to be in order for VLOOKUP to work.
  • Feb 21, 2007, 02:41 PM
    Amyunimus
    Thanks, I just adjusted the range for all cells and it worked.

  • All times are GMT -7. The time now is 06:39 AM.