minimum value in range

  • Thread starter Thread starter SUNIL
  • Start date Start date
S

SUNIL

Min = Application.WorksheetFunction.Min(Range(Cells(Row%, 6), Cells(Row%,
9)))
if min=0 then.......

This command ignores blank cells , but i also want it to ignore cells
containing a value 0, or 0.0 or 0.00 , is this possible
 
sStr = Cells(row,6).Resize(1,4).Address(0,0,,True)
dblMin = Evaluate("Min(if(IsNumber(" & sStr & ")*(" & _
sStr & "<>0)," & sStr & "))")
 
if cells(CurRow,CurCol).value<>"0" and cells(CurRow,CurCol).value<>"0.0"
and cells(CurRow,CurCol).value<>"0.00" then dosomething
 
Tom,
your solution is wonderful! Please, can you navigate me/us to othe
examples for 'Evaluate' ?

Thanks, Jarek
 
Evaluate will accept strings that would be valid if entered into a worksheet
cell. In this case, the string was an array formula.
 

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

Back
Top