I am currently using the following code to find an average of all the numbers in the B column that contain an MALE in the A column. Cell A50 contains the total number of MALES in column A6:A45. This falls down when there is no corresponding data in the B column for one of the males. Is there anyway of calculating this so it only divides or averages by the number of cells that contain data?
[code]
=SUMIF(A6:A45,"MALE",(B6:B45))/A50
[code]
Bookmarks