Hi all,
I'm fairly well versed in functions and array formulas and am surprised that I'm just running into the issue below for the first time. I want to average the data in 'column b' only if the qualifiers 'x' and 'y' are met in 'column a'. For example
Column A Column B
Red 2
Red 4
Yellow 5
Yellow 7
Blue 8
Green 10
I want the average of 'column b' data that corresponds to 'red' and 'yellow'. The answer should be 4.5. I've tried several 'averageif' formulas with 'and' and 'or'. Can seemed to get it right other than a formula that reads: (averageif red + average if yellow) / (counta(if yellow) + counta(if red)). I am thinking that there may be a simpler way, which would be helpful with my more complicated model.
Thanks!
I'm fairly well versed in functions and array formulas and am surprised that I'm just running into the issue below for the first time. I want to average the data in 'column b' only if the qualifiers 'x' and 'y' are met in 'column a'. For example
Column A Column B
Red 2
Red 4
Yellow 5
Yellow 7
Blue 8
Green 10
I want the average of 'column b' data that corresponds to 'red' and 'yellow'. The answer should be 4.5. I've tried several 'averageif' formulas with 'and' and 'or'. Can seemed to get it right other than a formula that reads: (averageif red + average if yellow) / (counta(if yellow) + counta(if red)). I am thinking that there may be a simpler way, which would be helpful with my more complicated model.
Thanks!