G
Guest
{=AVERAGE(IF(AND(B2:B13241=1,D2
13241=2),N2:N13241,""))}
why doesn't this formula work? thanx!

why doesn't this formula work? thanx!
Knox said:{=AVERAGE(IF(AND(B2:B13241=1,D213241=2),N2:N13241,""))}
why doesn't this formula work? thanx!
Knox said:{=AVERAGE(IF(AND(B2:B13241=1,D213241=2),N2:N13241,""))}
Stephen said:Because you can't use AND with arrays (as it returns only a single result,
not an array). Instead you need to multiply the two arrays:
{=AVERAGE(IF((B2:B13=1)*(D213=2),N2:N13,""))}