PDA

View Full Version : [SOLVED:] Find Small in and Array



jumpbackjack
04-03-2023, 03:30 PM
I'm trying to find the first Small number in a one dimensional array as shown below. I'm trying to use SortArray() to define that range. Is this not possible? If so, how can I sort an array. Thanks.


L = WorksheetFunction.Small(SortArray(1), SortArray(4), 1)

mancubus
04-04-2023, 12:31 AM
this may give you an idea:

MsgBox Application.Small(Array(1, 10, 45, 5, 60, 7, 9), 5)

the result is 10, which is the 5th smallest number in the array.

p45cal
04-05-2023, 03:41 AM
Not at all sure what you're trying to do but you might get more joy using Application rather then WorksheetFunction, especially if you're using an array as the 2nd argument of the Small function:
30710