Solved

Counting cells against conditions in 2 columns

Posted on 2011-02-17
6
235 Views
Last Modified: 2012-05-11
I run Excel 2002 in Windows 7.  
I have a sheet which grades many examples of 3 items (called A B and C, say) into 3 grades (1, 2, and 3). Each example gets a new row.
Col A contains the Item name, Cols B-H contain other data, Cols I-O contain tests and Col P contains the calculated grade for that example.
I need to count how many examples of Item A in Col A are graded as a 3 in Col P, etc.
Could someone guide me?
Thanks in advance
Tony
0
Comment
Question by:aws148
6 Comments
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
ID: 34914838
sear AWS,

you could use a sumproduct for this.. I will give you the correct formula when you can give me a example.
I run dutch version so paste the formula will not work ...

Kr

Eric
0
 
LVL 33

Expert Comment

by:jppinto
ID: 34914843
Could you post a sample data please? It's not clear what you want to do...

jppinto
0
 
LVL 33

Expert Comment

by:jppinto
ID: 34914856
If you just want to count the number 3 in column A, you can use a simple COUNTIF():

=COUNTIF(A:A,3)

If you want to count using multiple criterias, you need to use SUMPRODUCT() function, like this example:

http://excel-user.blogspot.com/2009/10/sumproduct-sum-values-based-on.html

If you post a sample data, I can give you a more realistic answer.

jppinto
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 33

Accepted Solution

by:
jppinto earned 400 total points
ID: 34914869
If I'm not mistaken, after reading again you question, this is the formula that you want:

=SUMPRODUCT((A:A="A")*(P:P=3))

It will count how many items "A" you have on column A that have a grade "3" in column P, right?

jppinto
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 100 total points
ID: 34914914
In Excel 2002 you need to use a fixed range for SUMPRODUCT (not the whole column) so you'd need to revise jppinto's suggestion something like this

=SUMPRODUCT((A$2:A$100="A")*(P$2:P$100=3))

extend ranges as required

regards, barry

regards, barry
0
 

Author Closing Comment

by:aws148
ID: 34915016
Thanks very much. Exactly what was needed.  And thanks in particular for reference to the simple article on the use of SUMPRODUCT which, for me anyway, has always been the hardest function to understand.
regards
Tony
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question