How to sumif with multiple criteria in one column?
In Excel, SUMIF function is a useful function for us to sum cells with multiple criteria in different columns, but with this function, we can also sum cells based on multiple criteria in one column. In this article. I will talk about how to sum values with more than one criteria in same column.
Sum cells with multiple OR criteria in one column with formulas
Sum cells with multiple OR criteria in one column with formulas
For example, I have the following data range, now, I would like to get the total orders of the product KTE and KTO in January.
For multiple OR criteria in the same field, use multiple SUMIF functions:
Formula 1: SUMIF + SUMIF
Please enter this formula: =SUMIF(A2:A10,"KTE",B2:B10) + SUMIF(A2:A10,"KTO",B2:B10), and then press Enter key, you will get the total value of the product KTE and KTO, see screenshots:
Notes:
1. In the above formula, A2:A10 is the range of cells that you want to apply the criteria against, B2:B10 is the cells which you want to sum, and KTE, KTO are the criteria you sum the cells based on.
2. In this example, there are only two criteria, you can apply more criteria just go on adding SUMIF( ) after the formula, such as =sumif(range, criteria, sum_range) + sumif(range, criteria, sum_range) + sumif(range, criteria, sum_range)+…
Formula 2: SUM and SUMIF
If there are multiple criteria need to be added, the above formula will be long and tedious, in this case, I can give you a more compact formula to solve it.
Type this formula into a blank cell: =SUM(SUMIF(A2:A10, {"KTE","KTO"}, B2:B10)), and then press Enter key to get the result you need, see screenshot:
Notes:
1. In the above formula, A2:A10 is the range of cells that you want to apply the criteria against, B2:B10 is the cells which you want to sum, and KTE, KTO are the criteria you sum the cells based on.
2. To sum with more criteria, you just need to add the criteria into the braces, such as =SUM(SUMIF(A2:A10, {"KTE","KTO","KTW","Office Tab"}, B2:B10)).
3. This formula only can use when the range cells that you want to apply the criteria against in a same column.
Advanced Combine Rows:(Combine duplicate rows and sum / average corresponding values):
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now! |
Related articles:
How to sumif with one or more criteria in Excel?
How to sum multiple columns based on single criteria in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!