MIN IF with multiple criteria Excel (Return earliest date if)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



MIN IF with multiple criteria Excel (Return earliest date if)



I've used the (hacked) MAX IF function before, so I am not sure why my MIN IF here isn't working (and yes I am array-entering). Doubt that would be the issue, but I'm using Excel on a virtual box (Windows Excel on a Mac).



I determined that the formula was breaking in the IF function. As you can see, it is returning 0, or FALSE, so when I wrap it in the MIN formula it is just giving me an issue. The desired result here should be 6/11/2014.



Example





how your dates are stored? as text ot as dates? if as text, try this one: =MIN(IF(C2:C5=G7,IF(D2:D5>0,DATEVALUE(B2:B5)))) with array entry
– Dmitry Pavliv
Apr 4 '14 at 20:50



=MIN(IF(C2:C5=G7,IF(D2:D5>0,DATEVALUE(B2:B5))))





they are stored as values, so dates/numbers, not text
– Lorenzo
Apr 4 '14 at 20:54





in that case =MIN(IF(C2:C5=G7,IF(D2:D5>0,B2:B5))) should work (I've just tested it with your data)
– Dmitry Pavliv
Apr 4 '14 at 20:54



=MIN(IF(C2:C5=G7,IF(D2:D5>0,B2:B5)))





Let me try on a native Windows
– Lorenzo
Apr 4 '14 at 20:56





The IF function you show in the question isn't "broken" - when you put that in a single cell like H7 - (not on a referenced row) you will just see the result from the first row - in this case because C2 <> "Teddy" you get FALSE and that's what you see in H7
– barry houdini
Apr 4 '14 at 22:00




2 Answers
2



Try this formula in H7:


=INDEX(B2:B5,MATCH(1,IF(C2:C5=G7,IF(D2:D5>0,1)),0))



confirm with Ctrl+Shift+Enter.



Showing your formula working with your data:



enter image description here






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS