LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Passing array from Access to Excel function

Dale:

Thanks TK..I really wanted to run this from within Access rather than
transferring to excel.


Doing this in Access as Robin points out is pretty strighrforward.

Maybe I misread your question

I want to pass an array to Excel to calculate the 90th percentile. Excel
(XL2003) can.....................


TK


"Dale" wrote:

Thanks TK..I really wanted to run this from within Access rather than
transferring to excel.


"TK" wrote in message
...
Dale:

The following is not exactly correct:

.... Excel
(XL2003) can
only tolerate 65536 rows of data.


I have not tested an array but if you wish to import a recordset
with more than 65536 records, Excel looks for the EOF, you do
however need to allow for the additional records over 65+K and
consider the amount of fields you wish to inport.

For example the following code will import 65k + records
with 3 field in col a b and c and the balance starting at d10

Worksheets("Sheet3").Range("A:A,C:C").CopyFromReco rdset rs
'/If more than 65,536 records you must add a second line
'/Starts at D10
Worksheets("Sheet3").Range("D10:f10000").CopyFromR ecordset rs

You may want to compare bringing in the records with
CopyFromRecordset vs an array. In my test Excel seems to
perfer the former.

Good Luck
TK


"Dale" wrote:

Wasn't sure if this was an access or excel question but here it goes:

Situation:
In an Access database (A2k) I have a recordset containing 85,000 records
of
which
I want to pass an array to Excel to calculate the 90th percentile. Excel
(XL2003) can
only tolerate 65536 rows of data.

Question:
Can I split the data into two columns and pass both columns as an array
to
Excel?
I'm not sure how would I reference the arguments for the function without
getting an invalid
arguments error if there are two columns?

Here's what I have for one column:
Result = appXL.Percentile((varArray()), 0.9)

Thanks for taking the time to help me out...
dale







 
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
Passing an array in a user defined function Peter M Excel Programming 5 June 27th 08 10:45 PM
Passing an array as argument for custom Function No Name Excel Programming 4 March 7th 05 04:44 PM
Passing array of strings from DLL function to VBA Jag Man Excel Programming 0 January 12th 04 10:09 PM
Passing array to a function GB[_3_] Excel Programming 3 October 21st 03 09:59 AM
Passing an Array of User-Defined Type to an Argument of a Function Tushar Mehta[_6_] Excel Programming 0 August 17th 03 06:43 PM


All times are GMT +1. The time now is 01:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"