Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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


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 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


    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.


    Count and sum cells based on background color / font color / conditional formatting:
    Kutools for Excel’s Count by Color can quickly count and sum cells based on background color, font color. With it, you can count and sum by conditional formatting color as well. Read more about this feature...
    doc count color

    Related articles:

    How to sumif with one or more criteria in Excel?

    How to sum multiple columns based on single criteria in Excel?


    Recommended Productivity Tools

    Ribbon of Excel (with Kutools for Excel installed)

    300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

    Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

    •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
    •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
    •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
    •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
    •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
    •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
    •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
    •  Change the way you work now, and give you a better life immediately!

    Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

    • Increases your productivity by 50% when viewing and editing multiple documents.
    • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
    • Open and create documents in new tabs of same window, rather than in new windows.
    • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
    Say something here...
    symbols left.
    You are guest ( Sign Up? )
    or post as a guest, but your post won't be published automatically.
    Loading comment... The comment will be refreshed after 00:00.
    • To post as a guest, your comment is unpublished.
      Jitendra Dhal · 1 years ago
      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..
    • To post as a guest, your comment is unpublished.
      Jitendra Dhal · 1 years ago
      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//
    • To post as a guest, your comment is unpublished.
      Konstantinos Gkitnos · 2 years ago
      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?
      • To post as a guest, your comment is unpublished.
        Micael · 6 months ago
        =SUM(SUMIF(A2:A10, {A:5\A:8}, B2:B10))
      • To post as a guest, your comment is unpublished.
        Prem · 1 years ago
        This is what I am looking for. Help me if you got answer of this
    • To post as a guest, your comment is unpublished.
      Konstantinos Gkitnos · 2 years ago
      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)?
    • To post as a guest, your comment is unpublished.
      Kyle · 2 years ago
      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!