+ Reply to Thread
Results 1 to 9 of 9

Return the Value from the Range that corresponds to Max Date.

  1. #1
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Return the Value from the Range that corresponds to Max Date.

    Good day,
    I've stuck with the following task:
    I want the formula that returns the value corresponding to newest date, or returns last entered value if dates are the same.
    Also formula should consider two additional conditions.

    My attempt:
    PHP Code: 
    =INDEX($E$2:$E$9,MATCH(MAX(IF(($A$2:$A$9)*($E$2:$E$9<>"")*($B$2:$B$9=G2)*($C$2:$C$9=H2)*($D$2:$D$9=I2),$A$2:$A$9)),$A$2:$A$9,0)) 
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,450

    Re: Return the Value from the Range that corresponds to Max Date.

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and pull down
    How can the last entered value be differentiated form the others?

  3. #3
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: Return the Value from the Range that corresponds to Max Date.

    Pepe Le Mokko
    Tried your formula, but seems the result is the same as mine.
    can the last entered value be differentiated form the others
    In J3 for "Procedure N2" value should be 24.
    Attached Images Attached Images

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Return the Value from the Range that corresponds to Max Date.

    Maybe try

    =LOOKUP(9^9,$E$2:$E$9/($B$2:$B$9=G2)/($D$2:$D$9=I2))
    order 66 for the department6 column C, order 67 will not match.

    or
    =LOOKUP(9^9,$E$2:$E$9/($B$2:$B$9=G2)/($D$2:$D$9=I2)/($C$2:$C$9=H2))
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: Return the Value from the Range that corresponds to Max Date.

    Pepe Le Mokko
    Sorry, my mistake. Order should not be 67 - only 66. Mistakenly copied down with number change. Your formula works, but, doesn't consider the max date. For instance if I change the date to newest for the procedure N1 the value remains the same. But it should correspond to the newest date.

    Bo_Ry
    Good day, thanks for formula but result is the same as above. Your formula doesn't consider newest date.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Return the Value from the Range that corresponds to Max Date.

    It doesn't need to consider the date if the latest date entered on the bottom.

  7. #7
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: Return the Value from the Range that corresponds to Max Date.

    Now I see, thank you. One remark. Formula returns zero if do not enter the latest date in the bottom keeping the relevant value cell empty. It should return previous available value for earlier date.
    Last edited by T.I.; 02-26-2021 at 03:29 PM.

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Return the Value from the Range that corresponds to Max Date.

    Add this
    =LOOKUP(9^9,$E$2:$E$9/($B$2:$B$9=G2)/($D$2:$D$9=I2)/($C$2:$C$9=H2)/($E$2:$E$9>0))

  9. #9
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: Return the Value from the Range that corresponds to Max Date.

    Bo_Ry
    Excellence! Thank you so much!

+ 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. Replies: 4
    Last Post: 02-10-2015, 02:56 PM
  2. How to return a that corresponds to min/max value in another row.
    By curt138 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-07-2014, 11:05 AM
  3. Trying to put data in a table that corresponds to a date
    By superdaw in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-17-2014, 06:49 AM
  4. Replies: 3
    Last Post: 05-19-2014, 05:19 PM
  5. Store values that corresponds to each date
    By siddiq1212 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2013, 05:33 PM
  6. Replies: 5
    Last Post: 11-07-2012, 02:15 PM
  7. Determining Which Quarter a Specified Date Corresponds With
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 12:00 PM

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