if - then for range

  • Thread starter Thread starter Tom G
  • Start date Start date
T

Tom G

I have 2 columns: A: grade, B:score

I want to find the average score for only one grade, say seventh grade

for grade = 7, average score for range of b1:b100

thanks
 
Tom,

Use :

=SUMIF(A1:A100,7,B1:B100)/COUNTIF(A1:A100,7)

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
that's a good solution: I had thought that there would be a more direct way
to use =average.

what should I do if I want to use an expression for the criteria such as
<>7?

Thanks,
Tom
 
=SUMIF(A1:A100,"<>7",B1:B100)/COUNTIF(A1:A100,"<>7")

you can also use the array formulas

=AVERAGE(IF(A1:A100=7,B1:B100))

or

=AVERAGE(IF(A1:A100<>7,B1:B100))

both entered with ctrl + shift & enter
 
Back
Top