Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Worksheet Function Large
I am trying to use the Excel Worksheet Function LARGE in a macro.
My code is Cells(2, 15) = Application.WorksheetFunction.Large(Array, n) in Excel 2003. I have tried every way I can think of to write the array but all array nomenclature I have tried results in a compile error. Help? Jim Walsh |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Worksheet Function Large
Try the below; with the sample data below
Range("B1") = WorksheetFunction.Large(Range("A1:A10"), 2) ColA 1 2 3 4 5 6 7 8 10 If this post helps click Yes --------------- Jacob Skaria "jswalsh33" wrote: I am trying to use the Excel Worksheet Function LARGE in a macro. My code is Cells(2, 15) = Application.WorksheetFunction.Large(Array, n) in Excel 2003. I have tried every way I can think of to write the array but all array nomenclature I have tried results in a compile error. Help? Jim Walsh |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Worksheet Function Large
More descriptive form would be
Dim arrTemp As Variant Dim intTemp as Integer intTemp = 2 arrTemp = Array(1, 2, 3, 4, 5) MsgBox WorksheetFunction.Large(arrTemp, intTemp) OR Dim rngTemp As Range Dim intTemp as Integer intTemp = 2 Set rngTemp = Worksheets("Sheet1").Range("A1:A10") MsgBox WorksheetFunction.Large(rngTemp, intTemp) If this post helps click Yes --------------- Jacob Skaria "Jacob Skaria" wrote: Try the below; with the sample data below Range("B1") = WorksheetFunction.Large(Range("A1:A10"), 2) ColA 1 2 3 4 5 6 7 8 10 If this post helps click Yes --------------- Jacob Skaria "jswalsh33" wrote: I am trying to use the Excel Worksheet Function LARGE in a macro. My code is Cells(2, 15) = Application.WorksheetFunction.Large(Array, n) in Excel 2003. I have tried every way I can think of to write the array but all array nomenclature I have tried results in a compile error. Help? Jim Walsh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Embedded Excel worksheet is too large for a Word page. How to fix | Excel Discussion (Misc queries) | |||
Avoid recomputation in a large excel worksheet | Excel Discussion (Misc queries) | |||
Excel 2003 - How to print a large worksheet that is actually readable | Excel Discussion (Misc queries) | |||
how do i save a large amount of data in a worksheet excel 4 | Excel Worksheet Functions | |||
Attaching a JET database to an Excel Worksheet OR storing large binary data in a worksheet | Excel Programming |