Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

MIN, using ARRAY

Experts,
I have an array that uses MIN.
It works fine however when choosing the MIN between, for example, 0 and 10, the below formula returns 10 and not the true MIN, which should be 0.

How to modify the below formula to return 0 if the MIN is 0.  This problem occurs only if there is a 0 in the values but if there is a negative then it does return the negative value.

I am not too familiar with arrays.  
thank you in advance.

{=MIN(IF(--(DATE(YEAR($B$20:$KV$20),MONTH($B$20:$KV20)+1,0)=EOMONTH(B1,0))*($B$37:$KV$37),($B$37:$KV$37)))}
Avatar of Rgonzo1971
Rgonzo1971

Could you send a dummy?
Avatar of pdvsa

ASKER

Please see attached...
MIN.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pdvsa

ASKER

Perfect.  I see where the modification was made.  Thank you very much!

Original:
{=MIN(IF(--(DATE(YEAR($B$20:$KV$20),MONTH($B$20:$KV20)+1,0)=EOMONTH(B1,0))*($B$37:$KV$37),($B$37:$KV$37)))}

Modified:
{=MIN(IF(--(DATE(YEAR($B$20:$KV$20),MONTH($B$20:$KV20)+1,0)=EOMONTH(B1,0)),($B$37:$KV$37)))}