MIN IF function searching for date, ignoring blank cells

Gijs

New Member
Joined
May 29, 2012
Messages
30
Hope someone can help me,

I'm trying to identify the earliest date in the month (of January) from a range ($J$13:$J$320).
  • =MIN(IF(1=MONTH($J$13:$J$320),$J$13:$J$320,"")) (Ctr+Shift+Enter).

It works like a charm, as long as the range doesn't contain a blank cell, which it does.
  • =MINA(IF(1=MONTH($J$13:$J$320),$J$13:$J$320,"")) yields the same false result: Jan 00 '00
  • =MINIFS formula is not an option; its not on my Excel 2011

Can anyone help me with my MIN IF a formula searching for date, ignoring blank cells?

Thanks in advance,
Gijs
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Adjust range to suit and try:
Code:
=MIN(IF(MONTH($A$2:$A$10)=1,IF(ISNUMBER($A$2:$A$10),$A$2:$A$10)))
with CTRL+SHIFT+ENTER
 
Upvote 0
Another option (for Excel 2010 or later) that does not require the Ctrl+Shift+Enter

=AGGREGATE(15,6,$J$13:$J$320/((MONTH($J$13:$J$320)=1)*($J$13:$J$320<>"")),1)
 
Upvote 0
You're welcome Gjs, though I'd use Peter_SSs example, just to avoid array formulae!
 
Upvote 0
Thank you Peter; Hugely appreciated!

Any ideas as to how I can avoid a Jan 00 '00 error when the range ($J$13:$J$320) doesn't have any date in the month
=MIN(IF(MONTH($J$13:$J$210)=10,IF(ISNUMBER($J$13:$J$210),$J$13:$J$210)))

Thanks again Peter. And wishing you already a good Sunday morning!
 
Upvote 0
Quick answer, wrap the function in
Code:
=ISERROR(function,””)
 
Upvote 0
Thanks for the fast response Jack.

Regrettably the formula returns a FALSE
=ISERROR(MIN(IF(MONTH($J$13:$J$210)=10,IF(ISNUMBER($J$13:$J$210),$J$13:$J$210,"")))) (Ctr+Shift+Enter)

Or have I misunderstood your instruction?
 
Upvote 0
Try
=IFERROR(AGGREGATE(15,6,$J$13:$J$320/((MONTH($J$13:$J$320)=1)*($J$13:$J$320<>"")),1),"")

If you want (or need) to continue with the C+S+E type formula
{=IF(COUNT($J$13:$J$320),MIN(IF(MONTH($J$13:$J$320)=1,IF(ISNUMBER($J$13:$J$320),$J$13:$J$320))),"")}
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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