Can you use IF statements, Match, Countif etc inside SUMPRODUCT

Kemidan2014

Board Regular
Joined
Apr 4, 2022
Messages
226
Office Version
  1. 365
Platform
  1. Windows
I need to graph some data off of a large spreadsheet that we maintain where we use drop down lists to standardize the inputs for example
Product type, Process it was made on, type of defect

I know there's always more than 1 way to skin a cat in excel so I was doing some googling and stumbled across the SUMPRODUCT which I feel might be useful

I was hoping to avoid having to arrange a series of macros to get the data i need for 9 charts by utilizing this sum product function

Is it possible to use SUM PRODUCT and use IF statements or Match to Sum numbers or Count? if so what would that syntax look like, the support website only shows simple math functions
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
You can nest anything inside anything as long as it returns the correct type of value for the function.

Without seeing the layout of the source data and some indication of what you want to do with it, examples are near impossible to provide. There are far to many variables to take into consideration which is why the help / support site only shows a few basic examples.
 
Upvote 0
So after alot of Googling and trial and error i found that this formula works

"=SUMPRODUCT((G8:G13="TCC")*(E8:E13="QPR")*(YEAR(F8:F13)=2022)*H8:H13)"

using the following fake table i made

Customer Complaint Tracker.xlsm
EFGHIJ
7TypeIssuedPart typeDefect qty
8QPR1/15/2021TCC3
9QIR2/27/2021CHC1
10QPR3/14/2022TCC2728
11QPR1/14/2022TCC1
12QPR7/16/2022PST1
13QIR8/19/2021PST1
WM-WS Breakdown
Cell Formulas
RangeFormula
J10J10=SUMPRODUCT((G8:G13="TCC")*(E8:E13="QPR")*(YEAR(F8:F13)=2022)*H8:H13)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top