Solved

# Counting cells against conditions in 2 columns

Posted on 2011-02-17
238 Views
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?
Tony
0
Question by:aws148
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 6

Expert Comment

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

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

jppinto
0

LVL 33

Expert Comment

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

LVL 33

Accepted Solution

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

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

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

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
###### Suggested Courses
Course of the Month9 days, 1 hour left to enroll