how to find the minimum value excluding zeros

  • Thread starter Thread starter yosilb
  • Start date Start date
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
 
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
|
|
 
Back
Top