find min value between date range

Steves73

Board Regular
Joined
Oct 19, 2016
Messages
173
Office Version
  1. 365
Platform
  1. Windows
Hi All

Ok, I know its a simple mistake but just can pin point it
Trying to return minimum value between 2 dates,
Formula in cell N11,

But, the formula works in the cell with the number "408" however when drag is down I am getting 0, I assume as some of the cell are blank the formula is retuning 0 as the minimum

Is there a way yo write the current formula to omit 0 and return the lower whole number?
Current Formula
"=MIN(IF((BK6:CZ6>=A6)*(BK6:CZ6<=B6),(BK11:CZ11)))"

1680947677477.png
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
If you are using a version prior to 2019, you will have use Ctrl-Shift-Enter, because you are doing an array calculation.
 
Upvote 0
VBA Code:
=SMALL(V12:AC12,COUNTIF($V$12:$AC$12,0)+1)

The above could should calculate the minimum without including zero
 

Attachments

  • minmax2.JPG
    minmax2.JPG
    24.6 KB · Views: 7
Upvote 0
Thanks all

Howevere I am trying to find the smallest between to date ranges (Date in Cells O3 & O4)

You will note that some of the ranges (Example - BJ11:BP11) have gaps, thus I assume the formula is picking them up and saying 0 if the lowest value.

Need the 0 omitted

I have put the formula in an array but still the same result


1680949809824.png
 

Attachments

  • 1680949592926.png
    1680949592926.png
    12.3 KB · Views: 6
  • 1680949731879.png
    1680949731879.png
    11.6 KB · Views: 6
Upvote 0
are you dragging the formula that you posted straight down, as is?

What I mean is, are you adding in the stationary '$' to make sure you are looking at the same dates?
 
Upvote 0
Try:

Pre 2019
If you are dragging the formula down, try =IF(MIN(IF(($BK$6:$CZ$6>=A6)*($BK$6:$CZ$6<=B6),($BK$11:$CZ&11)))=0,"",MIN(IF(($BK$6:$CZ$6>=A6)*($BK$6:$CZ$6<=B6),($BK$11:$CZ&11)))) - Use Ctrl-Shift-Enter

After 2019
=IF(MINIFS($BK$11:$CZ&11,$BK$6:$CZ$6,">="&$A$6,$BK$6:$CZ$6,"<="&$B$6)=0,"",MINIFS($BK$11:$CZ&11,$BK$6:$CZ$6,">="&$A$6,$BK$6:$CZ$6,"<="&$B$6))
 
Upvote 0
Solution
Hi All

After a few goes I managed to get it working, thank you very much for your help

Used - =IF(MIN(IF(($BK$6:$CZ$6>=A6)*($BK$6:$CZ$6<=B6),($BK$11:$CZ&11)))=0,"",MIN(IF(($BK$6:$CZ$6>=A6)*($BK$6:$CZ$6<=B6),($BK$11:$CZ&11))))
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,100
Members
452,301
Latest member
QualityAssurance

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