Hi all,

I'm new to excel programming. I'm task to compute the average if several criteria is met. I have output.xls and inside this workook there is a button. When a user click this button, it will calculate for them the average. And I have another workbook, data.xls that has a total of 40 columns and 40640 rows(The data will get bigger). I have to find the average by month,week,service,testname and result. The result of this average will be in output.xls

Is there any macro to write so they know when to find the average? I'm using excel 2003. I don't even know where and how to start. So far I only tried the AVERAGE(IF(......
However,it is not efficient and sometimes it will come out an error.

Anybody can help?

Thanks in advance