+ Reply to Thread
Results 1 to 12 of 12

Index, Match and Max Formula

  1. #1
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Index, Match and Max Formula

    Hello,

    I have a working formula but I am bit confused on including a MAX part of the formula. Essentially I am needing this to search the list for the latest date and return that as opposed to just the first one it finds in the list that is a match.

    Please Login or Register  to view this content.
    Again, this does exactly what its supposed to but it is returning the first Match found as opposed to the newest. Any ideas on modifying a code like this to add in a MAX function. I would really appreciate any assistance.

  2. #2
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Index, Match and Max Formula

    Apply the MAX around the lookup_value(but instead of just M2, do the max on the column or range in M)
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  3. #3
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Re: Index, Match and Max Formula

    Thank you. I attempted to follow your instructions but I am getting a #Name error. I must be misunderstanding:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Index, Match and Max Formula

    Can you, please, upload a sample file?
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  5. #5
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Index, Match and Max Formula

    sample file would help trouble shoot the issue, the steps are above in the yellow banner.

    May need to add another formula within the above to find the max date for that record you trying to find..

  6. #6
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Re: Index, Match and Max Formula

    Thank you for the responses. I attached an example workbook to this email. Please let me know if I can provide any other info.
    Attached Files Attached Files

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: Index, Match and Max Formula

    The original formula is written like this =INDEX($I:$I,AGGREGATE(14,7,ROW($2:$102)-1/($C$2:$C$102=M2),1)), I read it POST#8 Reply, re-examined my
    own results and still found that this formula made a small mistake. Looking at the results in detail, there will be problems, so I thought of the
    simpler and correct method as follows, and also use the AGGREGATE function

    HTML Code: 
    Cell N2 formula , drag down

    HTML Code: 
    Array formula

    HTML Code: 
    Last edited by wk9128; 07-19-2021 at 06:04 PM.

  8. #8
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Re: Index, Match and Max Formula

    Worked like a charm. I've never actually used an Aggregate formula like this before so I definitely learned something after researching it. Thank you so much.

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: Index, Match and Max Formula

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'.

    I found a problem

    1. when Test17, the return of 2021/7/14 is correct, but the return of 2021/7/12 is incorrect
    2. when Test22, the return of 2021/7/14 is correct, but the return of 2021/7/12 is incorrect
    3. when Test24, the return of 2021/7/9 is correct, but the return of 2021/7/7 is incorrect

    POST#7 has updated the correct formula
    Last edited by wk9128; 07-19-2021 at 11:06 AM.

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Index, Match and Max Formula

    wk9128 please don't edit your posts after they have already had response (#7). Though you mention it later it still confuses the flow of the conversation. Instead post corrections in a new post and refer to the post that is in error.

    Thank you.
    Last edited by FlameRetired; 07-19-2021 at 12:34 PM.
    Dave

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Index, Match and Max Formula

    Another way.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: Index, Match and Max Formula

    Sorry @FlameRetired , the original problem has been placed back to POST#7 and the correct solution has been revised at the same time

+ 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. [SOLVED] Index Match not cycling through entire index. Formula not updating when values change...
    By nordxnortheast in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-07-2020, 10:44 AM
  2. Replies: 1
    Last Post: 08-17-2019, 01:11 PM
  3. Index Match formula changing my Index daily
    By vitt4300 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-31-2017, 02:19 PM
  4. [SOLVED] This formula works but I donīt understand why Index(Index) match
    By campelliann in forum Excel General
    Replies: 2
    Last Post: 01-25-2016, 05:55 PM
  5. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  6. Index Match Index Formula work slow
    By avk in forum Excel General
    Replies: 9
    Last Post: 03-07-2012, 02:19 PM
  7. Replies: 5
    Last Post: 02-29-2012, 08:51 PM

Tags for this Thread

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