Thread: "average" IF
View Single Post
  #3   Report Post  
Domenic
 
Posts: n/a
Default


Assuming that A1:G3 contains your data, including your row header,
try...

=AVERAGE(IF(B2:G2="L",B3:G3))

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER. If you enter L,
F, and C in cells A10:A12, you could enter the following formula in B10
and copy down:

=AVERAGE(IF($B$2:$G$2=A10,$B$3:$G$3))

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

mpanty Wrote:
Hi.

I have a table with rating values for each game my team plays, and the
games played belong to different categories (league, friendly, cup
etc.).

My question is: is there a way to tell Excel to calculate the average
of only league games, friendly games, and cup games separately?

For example:

*Game * -1 / 2 / 3 / 4 / 5 / 6-
*Category * -L / L / F / C / L / C-
*Rating *- 6.7 / 5.6 / 5.3 / 7.5 / 6.7 / 7.8-

Is there a way to tell Excel: pick only the values which have
corresponding column values of L (for league) and calculate an average
of only those values? Then for friendly (F) and Cup (C) games?

Thanks for your help.



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=399295