Max,
For the OPs information really, but it may not be appropriate to do the
blank test. If a week number is 1 and the value is blank, it may be correct
to include that in the average
=AVERAGE(IF($A$1:$A$200=C1,$B$1:$B$200))
BTW, brought a smile to my face seeing you use cjoint :-))
Regards
Bob
"Max" wrote in message
...
.. and a quick sample, in case needed:
http://cjoint.com/?lck01cr7y4
Cheese_newusers.xls
Note that the average formula as suggested will ignore empty cells or
formula cells within B1:B200 evaluating to null (""), re - the condition:
... ($B$1:$B$200<"") ..
If we need it to ignore cells containing zeros as well,
then we could add-on say, the condition: .. ($B$1:$B$2000) ..
i.e. put instead in D1, array-enter as before, and copy down to D7:
=AVERAGE(IF(($B$1:$B$2000)*($B$1:$B$200<"")*($A$ 1:$A$200=C1),$B$1:$B$200))
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--