Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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
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
Embedded Excel worksheet is too large for a Word page. How to fix Ron092007 Excel Discussion (Misc queries) 1 July 30th 09 12:50 PM
Avoid recomputation in a large excel worksheet cox Excel Discussion (Misc queries) 2 December 24th 08 07:02 PM
Excel 2003 - How to print a large worksheet that is actually readable Laphan Excel Discussion (Misc queries) 2 September 8th 08 11:28 PM
how do i save a large amount of data in a worksheet excel 4 Rana Excel Worksheet Functions 1 June 13th 06 10:54 AM
Attaching a JET database to an Excel Worksheet OR storing large binary data in a worksheet Ant Waters Excel Programming 1 September 3rd 03 11:34 AM


All times are GMT +1. The time now is 09:00 PM.

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"