![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com