+ Reply to Thread
Results 1 to 4 of 4

Return last matching value?

  1. #1
    Forum Contributor
    Join Date
    10-29-2004
    Posts
    291

    Return last matching value?

    Please Login or Register  to view this content.
    This formula searches from the top to find the matching value. Is there a way to have it search from the bottom of the range to find the last matching value?

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

    Re: Return last matching value?

    No, scrub that - I clicked on Submit Post before I tested it.

    Pete
    Last edited by Pete_UK; 01-18-2015 at 04:05 PM.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Return last matching value?

    Im pretty sure that some1 will give you a better suggestion, but I would do this with a helper column using countif() to count the occurances, then use index/match/large, something like this...

    A
    B
    C
    D
    1
    aa
    1
    1
    7
    2
    bb
    2
    1
    aa
    3
    cc
    3
    1
    4
    aa
    4
    2
    5
    bb
    5
    2
    6
    cc
    6
    2
    7
    aa
    7
    3
    8
    bb
    8
    3
    9
    cc
    9
    3


    C1=COUNTIF($A$1:A1,A1)
    D1=INDEX($B$1:$B$9,MATCH(D2&LARGE(IF($A$1:$A$9=A1,$C$1:$C$9,0),1),A1:A9&C1:C9,0))
    This is an ARRAY formula and needs to be entered using CTRL SHT ENTER, not jusdt enter

    d2=search criteria
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return last matching value?

    Maybe you could sort the data in Z - A (instead of A - Z).

    After that you could use your own formula.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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. Matching two columns to return one value
    By Tonyibbs in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-07-2014, 04:25 PM
  2. [SOLVED] Return cell values for non-matching & matching criteria
    By jenz_skallemose in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-13-2012, 11:52 AM
  3. [SOLVED] Lookup matching Value and return name
    By Montoro22 in forum Excel General
    Replies: 5
    Last Post: 07-24-2012, 11:09 AM
  4. Return all matching results
    By bibleguy125 in forum Excel General
    Replies: 1
    Last Post: 10-20-2011, 05:42 PM
  5. return cell below matching value
    By eddyet in forum Excel General
    Replies: 3
    Last Post: 01-21-2009, 08:48 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