Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Easy Array Question...

Dim DataArray() As Double
ReDim DataArray(1 to iFinalCount)

Alan Beban

Jeff Harbin wrote:

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Easy Array Question...

Alan,

Can't e-mail you.
I might have a few interesting array functions for you.
Just let me know and I will mail them to you.

RBS


"Alan Beban" wrote in message
...
Dim DataArray() As Double
ReDim DataArray(1 to iFinalCount)

Alan Beban

Jeff Harbin wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Easy Array Question...

RB Smissaert wrote:
Alan,

Can't e-mail you.
I might have a few interesting array functions for you.
Just let me know and I will mail them to you.

RBS

Bart,

I've emailed you my email address. Is that what you meant?

Alan
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Easy Array Question...

Alan,

That is what I meant, but got it now.

Bart


"Alan Beban" wrote in message
...
RB Smissaert wrote:
Alan,

Can't e-mail you.
I might have a few interesting array functions for you.
Just let me know and I will mail them to you.

RBS

Bart,

I've emailed you my email address. Is that what you meant?

Alan


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
Easy question Excel Wired Excel Discussion (Misc queries) 2 July 29th 09 04:53 PM
Easy Question - Please help martinbarnes Excel Discussion (Misc queries) 2 March 6th 08 04:34 PM
Easy Question M&M[_2_] Excel Discussion (Misc queries) 3 July 24th 07 12:34 AM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
Easy Array Question... Tom Ogilvy Excel Programming 0 August 19th 04 07:37 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"