
Originally Posted by
benishiryo
welcome to the forum, Ganesankadarkarai. if your dates are arranged in ascending order, try this in J15:
=INDEX(D7:D28,MATCH(J12,E7:E28,0))
and in K15:
=LOOKUP(2,1/(E7:E28=J12),D7:D28)
if they're not, and you want to find the earliest/latest date with the search value, then try this array formula:
=MIN(IF(E7:E28=J12,D7:D28))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
change to MAX for K15. or use this SUMPRODUCT formula:
=SUMPRODUCT(MAX((E7:E28=J12)*D7:D28))
Bookmarks