View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jason[_14_] Jason[_14_] is offline
external usenet poster
 
Posts: 21
Default Comparing, counting, if, sum... help...

If you're counting each subject I'd assume you are using something like:

=COUNTIF(A1:D10,1)

which will count all instances of subject code 1. Now if some other
codes represent multiple subjects then you just include this in the countif.
So, if code 5 represents subject codes 1 and 4, then when you're
counting subject codes 1 and 4 you need to add the count of subject code
5. You also mention code 6 represents subject codes 1,2 and 4. So, to
count all instances of subject code 1 use the following:

=COUNTIF(A1:D10,1)+COUNTIF(A1:D10,5)+COUNTIF(A1:D1 0,6)

which simply counts all instances of the subject codes that represent
subject 1 and adds them together --- Add a countif for each code that
represents the subject being counted.

Jay
__