Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to assign "" for any error on frequency analysis? | Excel Discussion (Misc queries) | |||
VBA - error message "Code excecution has been interupted" | Excel Discussion (Misc queries) | |||
Error Code: "Too many different cell formats" | Excel Discussion (Misc queries) | |||
Error Code: "Too many different cell formats" | Excel Discussion (Misc queries) | |||
"File Format Not Valid" When Starting Excel. Error Code 0D3F6000 | Excel Discussion (Misc queries) |