Skip to main content

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


arrow blue right bubble 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.

doc-sum-multiple-criteria-one-column-1

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:

doc-sum-multiple-criteria-one-column-2
-1
doc-sum-multiple-criteria-one-column-3

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:

doc-sum-multiple-criteria-one-column-4

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):
  • 1. Specify the key column that you want to combine other column based on;
  • 2. Choose one calculation for your combined data.

doc-sum-columns-one-criteria-7

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

Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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...

kte tab 201905


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!
Comments (20)
Rated 4.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Queria somar em um intervalo, onde o critério está em uma coluna, mas ao chegar no critério a soma parasse.

A B
1 Amor 3
2 Paixão 4
3 Ódio 6
4 Raiva 1
5 Excel 2
6 Carro 9
7 Moto 6
8 Avião 5

Somar de Paixão até moto, mas não é fixa a quantidade linhas. Então a função teria que começar a somar em Paixão e parar a soma em Moto.

4+6+1+2+9+6 = 28
This comment was minimized by the moderator on the site
Busquei muito no Gogle uma forma de somar valores diferentes dentro da mesma coluna e com sua dica, consegui o que eu queria! Valeu!!!
Rated 4.5 out of 5
This comment was minimized by the moderator on the site
what if instead of "KTE" and "KTO" I wanna use E:1 and E:2 cells, please help

=SUM(SUMIF(A2:A10, {"KTE","KTO"}, B2:B10))
This comment was minimized by the moderator on the site
Hello, Alejandro,
To use the cell references instead of the specific text value, you just need to apply the below array formula:
=SUM(SUMIF(A2:A10,E1:E2,B2:B10))
After entering this formula, please press Ctrl + Shift + Enter keys together to get the result.
This comment was minimized by the moderator on the site
O meu problema é, em um intervalo de 5000 linhas, tenho que somar 630, mas o titulo fica na mesma coluna dos critérios
This comment was minimized by the moderator on the site
thanks this helped a lot! :)
This comment was minimized by the moderator on the site
Hi, I Need to put in a drop Down in 3 Slab for using sumif. Example Slab 1-A,2-B,3-C & Total Sumof 3 Slab Please Suggest..
This comment was minimized by the moderator on the site
Hi, I Need to Understand, How to Make the multiple criteria in sumifs function along with Total Value in a Drop Down. Please suggest. Example In a Drop Down I need to put 4 Slab (1-A,1-B,1-C & Total of (1-A,1-B,1-C) Slab. JItendra//
This comment was minimized by the moderator on the site
As shown above, we can do either =SUMIF(A2:A10,"KTE",B2:B10) + SUMIF(A2:A10,"KTO",B2:B10) or =SUM(SUMIF(A2:A10, {"KTE","KTO"}, B2:B10)) for short What if I don't want to use KTE and KTO directly in the code and use the cell they are into? How am I suppose to write the code for the short version?
This comment was minimized by the moderator on the site
=SUM(SUMIF(A2:A10, {A:5\A:8}, B2:B10))
This comment was minimized by the moderator on the site
This is what I am looking for. Help me if you got answer of this
This comment was minimized by the moderator on the site
Hi, Is there a way to use INDIRECT function, eg INDIRECT(E3), instead of using "Apple" in the SUMIF function? eg. SUM(SUMIF(A1:A5, {"Apple","Orange"}, C1:C5)) and use something like this SUM(SUMIF(A1:A5,(INDIRECT(E3),INDIRECT(E4)),C1:C5)?
This comment was minimized by the moderator on the site
I'm hoping someone can help me with this. Name Categories John 1, 5, 8, 10, 12 Mike 4, 8, 9, 11, 15 Brittany 2, 5, 14, 23 Angela 1, 6, 7, 14, 19 David 11, 10, 23 In the above scenario, the categories for each person are what would be within the brackets of a SUM(SUMIFS( formula. I am trying to create a formula that can be dragged down for my entire data set. The problem is my data set is for hundreds of people, so creating IF statements for each scenario makes the formula entirely too long. Is there any way the criteria within the brackets can be a cell reference? Or if there are any other suggestions I would greatly appreciate it. Thanks!
This comment was minimized by the moderator on the site
Is there a way to do an "AND" statement instead of an "OR" statement?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations