how to find the minimum value excluding zeros

Y

yosilb

Hi every body

I'm using the fllowing instruction to find the minimum value in a range

MinVal=Application.WorksheetFunction.Min("A1:A100")

but I need to exclude the cells with zeros from the search

any ideas ?

thanks
 
J

Jim Rech

One way:

MsgBox Evaluate("MIN(IF(A1:A100=0,"""",A1:A100))")

--
Jim
| Hi every body
|
| I'm using the fllowing instruction to find the minimum value in a range
|
| MinVal=Application.WorksheetFunction.Min("A1:A100")
|
| but I need to exclude the cells with zeros from the search
|
| any ideas ?
|
| thanks
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top