Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Counting using 2 categories

I have a spread shett which is recording lesson observation data e.g.

Subject Grade
Art 3
Maths 1
Art 4
Maths 2
Art 2

I want to get the spreadsheet to avaerage the grades for each subject
seprately e.g. Art 2
Maths 1.5
Does anyone have any ideas what formula(s) I should use.

Many thanks

Nick Horn
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Counting using 2 categories

A couple of ways, assume subjects in A2:A10 and grades in B2:B10


=AVERAGE(IF(A2:A10="Art",B2:B10))


entered with ctrl + shift & enter


or

=SUMIF(A2:A10,"Art",B2:B10)/COUNTIF(A2:A10,"Art")


since you want to be able to change subjects easily replace the word "Art"
with a cell where you put the different
subjects


=AVERAGE(IF(A2:A10=E1,B2:B10))


and


=SUMIF(A2:A10,E1,B2:B10)/COUNTIF(A2:A10,E1)


--


Regards,


Peo Sjoblom



"Nick Horn" wrote in message
...
I have a spread shett which is recording lesson observation data e.g.

Subject Grade
Art 3
Maths 1
Art 4
Maths 2
Art 2

I want to get the spreadsheet to avaerage the grades for each subject
seprately e.g. Art 2
Maths 1.5
Does anyone have any ideas what formula(s) I should use.

Many thanks

Nick Horn



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Counting using 2 categories

You can use this for "Art"...

=SUMPRODUCT((A$2:A$100="Art")*(B$2:B$100))/COUNTIF(A$2:A$100,"Art")

and, by changing the 2 occurrences of "Art" to "Maths", get the average for
that subject instead. You could also put the subject name in a cell, say C1,
and get the average using that reference instead...

=SUMPRODUCT((A$2:A$100=C1)*(B$2:B$100))/COUNTIF(A$2:A$100,C1)

Rick


"Nick Horn" wrote in message
...
I have a spread shett which is recording lesson observation data e.g.

Subject Grade
Art 3
Maths 1
Art 4
Maths 2
Art 2

I want to get the spreadsheet to avaerage the grades for each subject
seprately e.g. Art 2
Maths 1.5
Does anyone have any ideas what formula(s) I should use.

Many thanks

Nick Horn


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting categories tryn2learn Excel Discussion (Misc queries) 1 February 27th 08 11:36 PM
Top Five in Categories Joe D Excel Discussion (Misc queries) 2 November 25th 05 05:17 PM
2 categories Joe Resler Excel Discussion (Misc queries) 4 November 2nd 05 08:37 PM
counting categories of text cells Brownjc96 Excel Discussion (Misc queries) 3 May 30th 05 01:37 PM
sum over categories mikebo Excel Discussion (Misc queries) 2 January 21st 05 05:11 PM


All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"