PC Review


Reply
Thread Tools Rate Thread

Count a range that matches the heading

 
 
JanetP
Guest
Posts: n/a
 
      19th Jun 2008
I have a spreadsheet that is tracking attendance and grades for a class. For
instance, column a has a list of names of people in the class; column d keeps
track of the attendance for 6/11, column e keeps track of the grade for 6/11.
column f keeps track of the attendance for 6/18; column g keeps track of the
grade for 6/18, etc. In order words, there are two columns per week. I am
using a sumif formula for the attendance that looks like
=sumif($d$6:$k$6,b$6,$d7:$k7) and that is working very well. However, I’m
having problems with the grades. Not everyone takes a test every week. I
want to be able to count the number of test scores for any given person –
some may have 2, some 5, some 10, etc. How do I get a count of tests taken
for each person?
 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      19th Jun 2008
So, sounds like you want to get a count of every other cell in the row that
contains a test grade (number?).

If there aren't too many cells involved the easiest way is:

=COUNT(E2,G2,I2,K2)

If there are a lot of cells involved try this:

=SUMPRODUCT(--(MOD(COLUMN(E2:K2)-COLUMN(E2),2)=0),--(E2:K2>0))

This does the exact same thing as the above COUNT formula.

I'm assuming that if a person does not take a test for a particular date
then that cell is left empty and the grades will be positive numbers greater
than 0.

--
Biff
Microsoft Excel MVP


"JanetP" <(E-Mail Removed)> wrote in message
news:8DD4AAC4-2223-407B-AAF3-(E-Mail Removed)...
>I have a spreadsheet that is tracking attendance and grades for a class.
>For
> instance, column a has a list of names of people in the class; column d
> keeps
> track of the attendance for 6/11, column e keeps track of the grade for
> 6/11.
> column f keeps track of the attendance for 6/18; column g keeps track of
> the
> grade for 6/18, etc. In order words, there are two columns per week. I
> am
> using a sumif formula for the attendance that looks like
> =sumif($d$6:$k$6,b$6,$d7:$k7) and that is working very well. However, I'm
> having problems with the grades. Not everyone takes a test every week. I
> want to be able to count the number of test scores for any given person -
> some may have 2, some 5, some 10, etc. How do I get a count of tests
> taken
> for each person?



 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      19th Jun 2008
Hi,
What sort of data do you use to mark attendance? (text or number)
What sort of data do you use to enter grades? (text or number)
What do you mean by "count the number of test scores"
Do you mean count 1 for each test, regardless of grade?
Regards - Dave.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Microsoft Excel Misc 1 18th Jun 2006 02:05 AM
Find the POSITION IN A RANGE of text in a string that matches value(s) in a range Cornell1992 Microsoft Excel Programming 0 14th Mar 2006 07:19 PM
Count Numerous Matches Only Once Paul Black Microsoft Excel Programming 2 14th Oct 2005 12:04 PM
COUNT INFORMATION IN COLUMN B ONLY IF A1 MATCHES K1 COUNT THAT CE. =?Utf-8?B?d2l0Y2hjYXQ5OA==?= Microsoft Excel Worksheet Functions 1 4th Feb 2005 01:38 PM
Go to column heading on start where column heading matches Today() =?Utf-8?B?SmFtZXMgRA==?= Microsoft Excel Worksheet Functions 1 3rd Jul 2004 03:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:33 PM.