PDA

View Full Version : AverageIf Finding Average Of Corresponding Values Matching A Specific Value



rovaniemi
07-05-2013, 01:02 PM
Hi everyone,

I have a doubt. I am attaching the worksheet here. I need to find the average of the C column.

Assuming X(212, 223, 242) have 4 values each. I would like to find the average of each X column values separately ( one value for whole 212, one 223 etc)

Thank you all for your patience and support. I am eagerly awaiting for your replies.

Excel Fox
07-05-2013, 01:59 PM
So for 212, will the average be Average(0,0,3,4) or Average(3,4)

EDIT: For the former, use D2=IF(COUNTIF(B$2:B2,B2)=1,AVERAGEIF($B$2:$B$17,B2 ,$C$2:$C$17),"") and drag down

For the latter, use D2=IF(COUNTIF(B$2:B2,B2)=1,AVERAGE(IF(($B$2:$B$17= B2)*($C$2:$C$17<>0),$C$2:$C$17,"")),"") as CSE (Array) formula

rovaniemi
07-05-2013, 02:17 PM
Thank you Excel fox for the reply. For 212 the average will be 0,0,3,4, for 223 5,8,7,1 respectively. I will try and let you know immediately.