SUMIF/AVERAGEIF with mulitle range and sum ranges

  • Thread starter Thread starter CSB
  • Start date Start date
C

CSB

Im getting an #VALUE! when putting in this formula

=AVERAGEIF(($B$6:$B$48,$B$70:$B$112,$B$134:$B$176,$B$198:$B$240),B262,($C$6:$C$48,$C$70:$C$112,$C$134:$C$176,$C$198:$C$240))

I know I'm using it wrong, please help!
 
You can't use muliple range references like that with AVERAGEIF.

Kind of long (but not as long as it could get!):

=SUMPRODUCT(--(CHOOSE({1,2,3,4},B6:B48,B70:B112,B134:B176,B198:B240)=B262),CHOOSE({1,2,3,4},C6:C48,C70:C112,C134:C176,C198:C240))/SUMPRODUCT(--(CHOOSE({1,2,3,4},B6:B48,B70:B112,B134:B176,B198:B240)=B262))
 
Back
Top