Sum/Count Multiple Conditions


New Member
Aug 3, 2010
I am looking for a couple of creative ways to achieve the following in excel:

On a spreadsheet I have a list of numbers that have been identified as the top five defect drivers. Also established are a top five list of typically occurring defects. The end result that I am trying to get to is a stacked bar chart that exhibits the top five part numbers and which of the top five defects affect those part numbers. In other words, I’d like to write a formula that will lookup the part number from a list and then count the defects from the established list of five and return a number. Hope this is making sense. I have attached an excel file (SUM MULTIPLE CONDITIONS.xls) that will hopefully illustrate my goal a little better if needed.

I’d prefer to stay away from VBA as much as possible and stick with formula options.

Last edited:

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.


Well-known Member
Oct 19, 2006
have u tried Pivot ?

Other way is the array formula ....
Count on Multiple condition:
Trick is to use SUM formula on range, when used with condition it returns 1 if condition is satisfied else zero.
E.g. SUM(A1="aa") ….. This will return 1 if cell A1 has value aa
When criteria is spanned over multiple columns, we have to use combination of multiplication and additioin according to the condition.
use multiplication for AND condition and addition for OR condition
i.e. if condition is COUNT IF A="aa" AND B="bb" AND C="cc" then,
={SUM((A1:A5="aa")*(B1:B5="bb")*(C1:C5="cc"))} ............ use Shift+Ctrl+Enter for Range Formula

if condition is COUNT IF A=("aa" OR "AA") AND B="bb" AND C="cc" then,
={SUM((A1:A5="aa")*(B1:B5="bb")*(C1:C5="cc")) + SUM((A1:A5="a1")*(B1:B5="bb")*(C1:C5="cc"))} ............ use Shift+Ctrl+Enter for Range Formula

Hope this helps .......

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...