Thread: Average
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Myrna Larson Myrna Larson is offline
external usenet poster
 
Posts: 863
Default Average

PS: You really ought to study your code to see why you are getting a different
answer. You always learn something from "debugging".

Are you sure this isn't just a rounding issue? If the cells on the worksheet
are the result of formulas, but displayed with, say, 2 decimal places, when
you use the AVERAGE formula, the complete number is used, not the rounded
version that you see. If you are working with the rounded numbers in your
code, you'll get a different result.

On Wed, 29 Sep 2004 21:14:20 -0700, "Darren" wrote:

Thanks for the reply.

Do you know then, the syntax to use if i want to use
Excel's average formula for col A, rows i to j? rows i and
j?
If i and j are both variables

Thanks
Darren

-----Original Message-----
No, it isn't possible. But I suspect the error is on your

end <bg.


On Wed, 29 Sep 2004 18:35:53 -0700, "Darren"

wrote:

I have written some code to find out average of some
numbers. Although if i used Excel's existing formula,
average, to work it out, the result would be different
(about less than 1% for an average of 720 numbers) from
that derived using my own code.
I wonder if the difference is due to rounding errors. Is
it possible to take a look at the code behind Excel's
existing formulas?


.