Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a array variable defined and I want to be able to pull out the
1st, 2nd, 3rd highest number out of all the available numbers. For example Mydata(1) = 3 Mydata(2) = 1 Mydata(3) = 4 Mydata(4) = 5 Is there a way to get the highest number out of the array? The 2nd highest number? I know I can do a little subroutine, but I'm hoping there's a more direct way to get the relative numbers. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Transfer the array into a worksheet column and then sort the column descending.
-- Gary's Student " wrote: I have a array variable defined and I want to be able to pull out the 1st, 2nd, 3rd highest number out of all the available numbers. For example Mydata(1) = 3 Mydata(2) = 1 Mydata(3) = 4 Mydata(4) = 5 Is there a way to get the highest number out of the array? The 2nd highest number? I know I can do a little subroutine, but I'm hoping there's a more direct way to get the relative numbers. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub ABC()
Dim mydata(1 To 4) mydata(1) = 3 mydata(2) = 1 mydata(3) = 4 mydata(4) = 5 MsgBox Application.Large(mydata, 1) Msgbox Application.Large(mydata,2) ' etc End Sub -- Regards, Tom Ogilvy wrote in message oups.com... I have a array variable defined and I want to be able to pull out the 1st, 2nd, 3rd highest number out of all the available numbers. For example Mydata(1) = 3 Mydata(2) = 1 Mydata(3) = 4 Mydata(4) = 5 Is there a way to get the highest number out of the array? The 2nd highest number? I know I can do a little subroutine, but I'm hoping there's a more direct way to get the relative numbers. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup selecting next highest value instead of equal or nearest l | Excel Worksheet Functions | |||
2 rows, highest No in row 1, then highest number in row 2 relating to that column, possible duplicates | Excel Worksheet Functions | |||
looking up figures in a column and selecting next highest match | Excel Worksheet Functions | |||
Selecting the 2nd highest value in a row. | Excel Worksheet Functions | |||
Locating lowest/highest cell value in an array | Excel Programming |