create macro to calculate Average amounts

BJS

Registered User.
Local time
Today, 20:02
Joined
Aug 29, 2002
Messages
109
Hi...I hope someone can help with this....it would sure be appreciated!

I have an Excel spreadsheet, which is output by MS Access. I can't get the Average amount to output, so I'm wondering if I can get the averages to calculate once the spreadsheet opens for the user.

The calculation for the Average amounts for each month (in red) is: Total/NumRecords
Total (in blue) = Sum(Total)
NumRecords = the number of rows for the month
The number of rows for each month will vary.
Note: There is one blank row before the start of each month

In this example, January has a total of 500, and there are 2 rows of data for January, so the Average = 500/2 (250)

I need it to calculate this for each month's average amount.


Data will look something like this:

January

Ch1, Ch2, Ch3 Tot, AvgCharge

100, 100, 0, 200, 66.67

200, 100, 0, 300, 100

January Total

300, 200, 0, 500, 250


February

Ch1, Ch2, Ch3 Tot, AvgCharge

200, 400, 0, 600, 200

100, 200, 0, 300, 100

February Total

300, 600, 0, 900, 450

I hope I have explained this clear enough.
Thanks very much in advance for some help with this.
 

Users who are viewing this thread

Back
Top Bottom