Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a VBA Function for WorksheetFunction.Text? Dennis Excel Programming 4 November 30th 06 03:56 PM
application.worksheetfunction. <function (syntax) Peter[_21_] Excel Programming 3 September 1st 04 08:24 PM
WorkSheetFunction.CountIf & WorkSheetFunction.SumIf with 2 conditions? Etien[_2_] Excel Programming 3 January 13th 04 04:07 PM
Using Excel WorksheetFunction.Mode function in Access VBA ANE Excel Programming 5 December 13th 03 08:26 PM


All times are GMT +1. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"