Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
is there a way to use the WorksheetFunction.Min function
is there a way to use the WorksheetFunction.Min function, But ignore 0's?
So for example iFirst2 = 6 iFirst3 = 0 iFirst4 = 10 Excel.WorksheetFunction.Min(iFirst2, iFirst3, iFirst4) I would like to get iFirst2 out. Not iFirst3. Or is there an easy way to get this value? thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
is there a way to use the WorksheetFunction.Min function
You can do it in code easy enough...
Dim R As Range Dim Min as Double For Each R In Range("A1:A10") If R.Value < 0 Then If R.Value < Min Or Min = 0 Then Min = R.Value End If Next -- Rick (MVP - Excel) "greg" wrote in message ... is there a way to use the WorksheetFunction.Min function, But ignore 0's? So for example iFirst2 = 6 iFirst3 = 0 iFirst4 = 10 Excel.WorksheetFunction.Min(iFirst2, iFirst3, iFirst4) I would like to get iFirst2 out. Not iFirst3. Or is there an easy way to get this value? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a VBA Function for WorksheetFunction.Text? | Excel Programming | |||
application.worksheetfunction. <function (syntax) | Excel Programming | |||
WorkSheetFunction.CountIf & WorkSheetFunction.SumIf with 2 conditions? | Excel Programming | |||
Using Excel WorksheetFunction.Mode function in Access VBA | Excel Programming |