How did you hide the NL rows? Manually?
Are you just trying to get the average and stdev for AB by league? To use averageif for this, you would need a to distinguish between AL and NL. As the table is, you don't have that.
=AVERAGEIF(range,criteria,averagerange)
range is the range that you are testing, in this case which league each player is in.
criteria is what you are testing for, in this case the leagues, AL and NL.
averagerange would be what you want to average, in this case AB.
In some cases, the first and last argument are the same, say for instance if you only wanted to average those player's AB who had 50 or more. In that case, the last argument is not necessary.
So what you need to do is specify the league affiliation for each player.
I would use the Format as Table function right away. It would make all this so much easier. I would do it for you but this is only a sample table and the work would be wasted since you would need to add the other players anyway.
|