Extract Max and relative date

Muthukrishnan V

Active Member
Joined
May 29, 2008
Messages
297
Office Version
  1. 365
Platform
  1. Windows
Excel 2007


Column A contains dates in dd-mm-yyyy
Column B contains values in numericals.
Column C1 = Start Date 01-01-2019
Column C2 = End Date. 31-01-2019

A B

16-12-2018 7000
21-01-2019 10305
22-01-2019 9785
24-01-2019 11400 (> Max during C1 to C2)
05-02-2019 18310



I want to extract the maximum value and the relative date
during the period C1 to C2 (01-01-2019 to 31-01-2019)



In the above data, I should get 11400 and 24-01-2019.
Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi,

There's probably an easier way to do this but this seems to work;


Book1
ABCD
101-01-19Start
2DatesValues31-01-19End
316-12-187000
421-01-1910305
522-01-199785
624-01-1911400
705-02-1918310
8
9DateMax DuringCriteria DatesCriteria Values
1024-01-191140021-01-1910305
1122-01-199785
1224-01-1911400
Sheet1
Cell Formulas
RangeFormula
C2=EOMONTH(C1,0)
C10{=IF(ROWS($B$10:B10)>COUNTIFS($A$3:$A$7,">="&$C$1,$A$3:$A$7,"<="&$C$2),"",INDEX($A$3:$A$7,SMALL(IF($A$3:$A$7>$C$1,ROW($A$3:$A$7)-ROW($A$2)),ROWS($B$10:B10))))}
A10=INDEX($C$10:$C$12,MATCH(B10,$D$10:$D$12,0))
B10{=MAX(D10:D14)}
D10{=IF(ROWS($B$10:B10)>COUNTIFS($A$3:$A$7,">="&$C$1,$A$3:$A$7,"<="&$C$2),"",INDEX($B$3:$B$7,SMALL(IF($A$3:$A$7>$C$1,ROW($A$3:$A$7)-ROW($A$2)),ROWS($B$10:B10))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top