Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to come up with a function or some way to return the lowest
repeatable number in a range of numbers. Here is a function that I have. It works but does not look pretty. Does anyone have a better routine or idea to acomplish this? Thanks Scott Function LowestRepeatableNumber(myRange As Range) Dim LastCount As Integer Dim LowestNumber LastCount = 0 LowestNumber = Application.WorksheetFunction.Max(myRange) For Each Value In myRange If Value = 0 Then GoTo 10 b = Application.WorksheetFunction.CountIf(myRange, Value) If b 2 And Value < LowestNumber Then LowestNumber = Value End If 10 Next Value LowestRepeatableNumber = LowestNumber End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Repeatable crash in Custom Error Bar range selection | Excel Discussion (Misc queries) | |||
determine lowest number in several columns and replace lowest numb | Excel Worksheet Functions | |||
Formula for displaying the lowest number of a range? | Excel Worksheet Functions | |||
Range vs. lowest #, 2nd lowest #, 3rd lowest #, etc | Excel Discussion (Misc queries) | |||
How can I get the lowest price, second lowest etc. from a range o. | Excel Worksheet Functions |