View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default Counting items in one column based on criteria in another column

One way:

=SUMPRODUCT(--(B2:B100="X"),--(WEEKDAY(C2:C100)=2))

HTH,
Paul

--

"luttona" wrote in message
...
I am looking to calculate the total number of students enrolled in each
class
on each day the class is offered:

Column A lists the student's name
Column B lists the class the student is taking
Column C lists the date the class will be taken

So, I want to find out how many students are taking class X on Monday,
then
how many are taking it on Tuesday, etc., for each class Y and Z and so on.

As a formula I was thinking along the lines of:

Count the number of times X appears in Column B if the date in Column C is
Monday

I've tried using IF and COUNTIF, but can't seem to get the syntax to work,
so I'm thinking I'm going about it all wrong.

Any suggestions? It would be most appreciated! Thank you!