+ Reply to Thread
Results 1 to 11 of 11

explanation of formula please

Hybrid View

  1. #1
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: explanation of formula please

    The values in A1:F1 must be sorted for this to work. If the LOOKUP function can't find the lookup_value (i.e. "zzzzzz..."), the function matches the largest value in lookup_vector (A1:F1 in this case) that is less than or equal to lookup_value.

    Hence it finds the last item within the array.

    A similar formula can be used for finding the last number in a numerical array, i.e.:

    =LOOKUP(10E10,A1:F1)

    where 10E10 and REPT("z",255) are just very large values.

    Hope this helps.

    Pete

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: explanation of formula please

    Quote Originally Posted by Pete_UK View Post
    the function matches the largest value in lookup_vector (A1:F1 in this case) that is less than or equal to lookup_value.

    Pete
    so this would always be the rightmost cell with any value in even if there were cells further left with beginning with letters further up the alphabet. does largest value in lookup vector mean highest cell

    i just cant quite grasp the logic behind this
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: explanation of formula please

    The data has to be sorted, so your comments don't apply.

    Suppose you have:

    A, D, F, M

    in those cells. Then the formula will return M, as it is the highest value less than "zzzzzz...".

    Pete

+ 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