min amount formula exclude zero


I would like to modify the following formula to calculate the minimum value in a range of cells exclude zeros and
determine the max number of rows.
I have set to a maximum of 50,000 rows
Thanks for your help
Ian BellretiredAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
try this

Open in new window

COUNTIF counts the zeros in the range plus 1 and informs SMALL to return the 'n'th smallest value.
Ian BellretiredAuthor Commented:
It works but if all the cells are zero it returns a #NUM error.
any suggestions ??
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
Hope you used =small((
2 brackets as I missed one earlier
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Ian BellretiredAuthor Commented:
This is the formula you provided.
It has 2 opening and two closing brackets


If all the cell contents contain zero then it posts the #NUM error
Excel amusantCommented:
Try this.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Could you precise this

and  determine the max number of rows.
Ian BellretiredAuthor Commented:
Sorry for the delay replying. The formula works well
Thank You guys
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.