Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Easy Array Question...
You want a dynamic array, so
You have to do it in two steps Dim DataArray() as Double Dim iFinalCount as Long iFinalcount = 200 Redim DataArray( 1 to iFinalCount) -- Regards, Tom Ogilvy "Jeff Harbin" wrote in message ... I've got an range of cells of varying size made up of predominately doubles with a few strings sprinkled amongst the doubles. I need to sort through the array, determine the number of doubles in the array, and then populate an array with the doubles. I thought I could loop through the cells count the number of doubles, store the number of doubles as a variable (iFinalCount), and then Dim an Array using the iFinalCount variable like so... Dim DataArray(1 to iFinalCount) as Double When I try to run the code I get the following error: Compile Error Constant Expression required If I hit Debug it takes me to the iFinalCount in the Array dimensioning statement. Btw...iFinalCount is defined as an integer Thanks, Jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hopefully an easy question | Excel Worksheet Functions | |||
If - easy question | Excel Discussion (Misc queries) | |||
Easy question for you all | Excel Worksheet Functions | |||
new user with easy question? not easy for me | New Users to Excel | |||
easy question | Excel Worksheet Functions |