+ Reply to Thread
Results 1 to 45 of 45

getting second to last values in a lookup with multiple values

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: getting second to last values in a lookup with multiple values

    Sure, although every time someone asks for data, nobody else ever responds lol, but here it goes. This is the new formula =LOOKUP(2,1/(B1:B8=E3),C2:C8) and it finds the corresponding value to the final value of Bob in column B. NOW, I want to use the same formula but modify it to find the NEXT TO LAST value of Bob in column B. The spreadsheet I have has tons of values for Bob, so even though in this spreadsheet it is the first value, I need the formula to find the value of Bob right before the last value of Bob. Can you do it!!????
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: getting second to last values in a lookup with multiple values

    Try this array formula**:

    =INDEX(C:C,LARGE(IF(B2:B8=E3,ROW(B2:B8)),N))

    Where N = the number of the instance you want to find from the bottom to the top.

    If N=1 then the formula will find the bottom-most instance. If N=2 then the formula will find the 2nd instance from the bottom.

    If you're wanting to find ALL instances then it's easier to look from the top down.

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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