Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Contents of an array

I have an array variable which contains 50 values between 1 and 11.
myValue(0) = 5, myValue(1) = 10, myValue(2) = 6 etc

Is there an easy way to get the sum of this array?
x = worksheetfunction.sum(myValue)? (I know this doesn't work).

Or do I need to do a For j = 0 to 49, Next j loop and sum as I go.

Thanks in advance.

Daniel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default Contents of an array

How do you know x = worksheetfunction.sum(myValue) doesn't work?
It does!

"Daniel Bonallack" wrote in
message ...
I have an array variable which contains 50 values between 1 and 11.
myValue(0) = 5, myValue(1) = 10, myValue(2) = 6 etc

Is there an easy way to get the sum of this array?
x = worksheetfunction.sum(myValue)? (I know this doesn't work).

Or do I need to do a For j = 0 to 49, Next j loop and sum as I go.

Thanks in advance.

Daniel



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Contents of an array

Oh. I got an error, but maybe that was for another reason. I'll go back to
the code and try again.

Thanks for helping.

Daniel

"Bob Umlas" wrote:

How do you know x = worksheetfunction.sum(myValue) doesn't work?
It does!

"Daniel Bonallack" wrote in
message ...
I have an array variable which contains 50 values between 1 and 11.
myValue(0) = 5, myValue(1) = 10, myValue(2) = 6 etc

Is there an easy way to get the sum of this array?
x = worksheetfunction.sum(myValue)? (I know this doesn't work).

Or do I need to do a For j = 0 to 49, Next j loop and sum as I go.

Thanks in advance.

Daniel




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
does an array contain contents of cell cooper_yonk New Users to Excel 2 November 27th 10 01:29 PM
How do I concatenate the contents of an array in Excel? Johnnie Walker Excel Worksheet Functions 0 February 16th 05 10:11 AM
Need help displaying array contents jsatz Excel Programming 3 October 3rd 03 09:33 PM
Dumping the contents of a VBA array to a sheet Dave[_15_] Excel Programming 6 August 9th 03 02:35 AM
Randomize the order of the contents of an array Lee Wold Excel Programming 3 July 12th 03 07:12 PM


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