Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error in using "Frequency" function in VBA code

I am using the following code to return a frequency distribution using
VBA in Excel:

myrange = Application.WorksheetFunction.Frequency(graph,
Range("bin"))
Range("af1:af17").Value = myrange

Whe
1) myrange is a variant
2) graph is a variant array with X rows and 1 column where X can be
anywhere from 1,000 to approximately 200,000
3) Range("bin") is named range that consists of 12 rows and 1 column

This appears to work correctly when the size of the graph array is
less than about 5000 rows. Using values in excess of about 5000 rows
produces the error message - " Run time error 13 - Type mismatch". I
need to do this when the size of graph approaches 100,000 to 200,000
rows. Any thoughts? Thank you!!!!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error in using "Frequency" function in VBA code

If the size is greater than 5461 elements then you get the error. This is
the limit on array arguments to worksheet functions.

You need to put your data down on a worksheet, possibly breaking it into
multiple columns.

--
Regards,
Tom Ogilvy

Gregg Ferguson wrote in message
om...
I am using the following code to return a frequency distribution using
VBA in Excel:

myrange = Application.WorksheetFunction.Frequency(graph,
Range("bin"))
Range("af1:af17").Value = myrange

Whe
1) myrange is a variant
2) graph is a variant array with X rows and 1 column where X can be
anywhere from 1,000 to approximately 200,000
3) Range("bin") is named range that consists of 12 rows and 1 column

This appears to work correctly when the size of the graph array is
less than about 5000 rows. Using values in excess of about 5000 rows
produces the error message - " Run time error 13 - Type mismatch". I
need to do this when the size of graph approaches 100,000 to 200,000
rows. Any thoughts? Thank you!!!!!!



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
How to assign "" for any error on frequency analysis? Eric Excel Discussion (Misc queries) 4 June 1st 07 06:00 PM
VBA - error message "Code excecution has been interupted" Jeff Excel Discussion (Misc queries) 1 March 24th 07 02:33 PM
Error Code: "Too many different cell formats" Stephane Rodriguez Excel Discussion (Misc queries) 0 January 13th 07 12:17 PM
Error Code: "Too many different cell formats" Katz Excel Discussion (Misc queries) 3 January 5th 07 08:01 PM
"File Format Not Valid" When Starting Excel. Error Code 0D3F6000 EMT_Hawk Excel Discussion (Misc queries) 4 March 31st 06 09:22 PM


All times are GMT +1. The time now is 11:54 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"