+ Reply to Thread
Results 1 to 8 of 8

VLOOKUP from bottom to top

  1. #1
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    VLOOKUP from bottom to top

    Hi Folks,

    I would like to perform a VLOOKUP operation & return values based on a match from bottom to top. By default, it would return the values corresponding to the top most match in the table array. I wanna do it the other way round.

    I know there should be a way to do this. May be by using the LOOKUP function. But, nothing is striking me right now.

    Regards,
    Karan

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: VLOOKUP from bottom to top

    Hi, you could try something like

    =LOOKUP(2,1/(A2:A100=C2),B2:B100)

    In the example C2 is what you are searching in A2:A100 for the correspondence in B2:B100.

    The number 2 can be substituted by any number greater than 1.

    Hoping it's a little step forward for your problem.

  3. #3
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    Re: VLOOKUP from bottom to top

    Well. That does solve the problem. Thanks a lot.

    Can I know what is the significance of the number 2 or any number greater than 1 in place of the first argument?

    Also, the significance of dividing 1 by the boolean array in the second argument. The Excel help doesn't mention anything about all this.

    Thanks again.

    Regards,
    Karan

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: VLOOKUP from bottom to top

    Hi, I've found a clear explanation

    http://www.eggheadcafe.com/software/...alue-in-a.aspx

    My elementary English would sound very strange (maybe funny).

    Regards,
    Last edited by canapone; 05-22-2010 at 03:08 AM.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VLOOKUP from bottom to top

    The link provided is excellent (unsurprising given the author - MS Excel MVP)

    FWIW - a reaffirmation if nothing more: http://www.excelforum.com/2252293-post5.html

  6. #6
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    Re: VLOOKUP from bottom to top

    What an explanation!!!

    That was a great piece of learning.

    Thanks,
    Karan

  7. #7
    Registered User
    Join Date
    08-16-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: VLOOKUP from bottom to top

    How can this be done using 2 variables? I want the formula find the last occurence of 2 criteria and return a value from a 3rd column in that same row. Can you nest a AND statement in it? Using the formula above, =LOOKUP(2,1/(A2:A100=C2),B2:B100), I would want not only to search for C2 in Column A but also value D2 in Column E and then return value from Column B like it was originally looking for.
    Last edited by zoefrannie; 08-16-2013 at 10:14 AM.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: VLOOKUP from bottom to top

    zoefrannie,

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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