+ Reply to Thread
Results 1 to 5 of 5

seeking a combined 'index' / vertical lookup with two citeria - formula

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    seeking a combined 'index' / vertical lookup with two citeria - formula

    Hi there,
    I'm searching for a formula which will return me the value in column C which goes with two criteria: (1) column A reads 'John' and (2) the highest date in column B. So the outcome would be 'fish' in the attached xls.

    Would appreciate if someone coule help me.

    Thanks,
    Niels
    Attached Files Attached Files

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

    Re: seeking a combined 'index' / vertical lookup with two citeria - formula

    This array* formula works with your sample data:

    =INDEX(C5:C12,MATCH(MAX(IF(A5:A12="John",B5:B12)),B5:B12,0))

    *Note that an array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE), rather than the usual <Enter>.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: seeking a combined 'index' / vertical lookup with two citeria - formula

    Pete, that's brilliant! Thanks a lot!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: seeking a combined 'index' / vertical lookup with two citeria - formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Array Entered with Ctrl-Shift-Enter rather than just Enter.

    @Pete: your formula will select the wrong entry if the highest date appears elsewhere (earlier)

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: seeking a combined 'index' / vertical lookup with two citeria - formula

    or, a non-array alternative... where John is in cell E5.
    =INDEX($C$5:$C$12,MATCH(MAX(INDEX(($A$5:$A$12=$E5)*($B$5:$B$12),0)),$B$5:$B$12,0))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Issue with sumproduct formula combined to INDEX MATCH
    By St3ff3ns in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-07-2015, 06:30 AM
  2. VBA - Index formula to be combined using IFERROR
    By gan_xl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2014, 06:15 AM
  3. [SOLVED] Combined INDEX and MATCH formula will not work - pls help!
    By Postlki1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-06-2013, 08:03 AM
  4. [SOLVED] Excel Lookup multiple citeria from one sheet to another
    By f1torque in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-20-2013, 02:23 AM
  5. [SOLVED] Using Index & Match to search 2 vertical columns and return data to a vertical set
    By QuietLife in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-08-2013, 09:59 AM
  6. Combined vertical and horizontal series?
    By sdcard_15 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-26-2008, 02:56 AM
  7. Array formula combined with Lookup
    By Kevin Gallagher in forum Excel General
    Replies: 9
    Last Post: 03-02-2006, 02:55 AM

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