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!

    Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
    Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
    • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
    • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
    • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
    • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
    • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
    • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
    • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

    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?


    Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

    • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
    • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
    • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
    • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
    • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
    • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
    • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
    • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
    • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
    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!
    officetab bottom
    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 · 2 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 · 2 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 · 1 years ago
        =SUM(SUMIF(A2:A10, {A:5\A:8}, B2:B10))
      • To post as a guest, your comment is unpublished.
        Prem · 2 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!
    • To post as a guest, your comment is unpublished.
      Cameron · 3 years ago
      Is there a way to do an "AND" statement instead of an "OR" statement?
    • To post as a guest, your comment is unpublished.
      Brandon Wagner · 3 years ago
      What if you wanted to do multiple (not equal to). Does anyone have a fix for that?
    • To post as a guest, your comment is unpublished.
      Anna · 3 years ago
      Can you help me? I have three different criteria (two are in the same column). For example: countif (D2:D4, "yes") + countif (E2:E6, {"member", "board"})....I know its not right but what can I do to get the total count of "yes" that are "member" or "board" .
    • To post as a guest, your comment is unpublished.
      FEFO · 3 years ago
      Try this: =SUM(SUMIFS(A1:A10,B1:B10,{“Mike”,”John”},C1:C10,{“Apple”,”Orange”},D1:D10,””,…))
      • To post as a guest, your comment is unpublished.
        Brandon Wagner · 3 years ago
        [quote name="FEFO"]Try this: =SUM(SUMIFS(A1:A10,B1:B10,{“Mike”,”John”},C1:C10,{“Apple”,”Orange”},D1:D10,””,…))[/quote]
        What if it's a (not equal to)? Can you do multiple values that way?
    • To post as a guest, your comment is unpublished.
      Yasir · 3 years ago
      hanks dear,
      could you please help me with multiple (or) conditions in multiple columns
      e.g.:
      SUMIFS(A1:A10,B1:B10,{“Mike”,”John”},C1:C10,{“Apple”,”Orange”},D1:D10,””,…)
      is this can work in somehow, I try but its give unreal result (Less than the actual) “it seems like the excel is calculating the second (or) condition based on the filtered data in the first (or) condition.
      thanks in advanced :),,
    • To post as a guest, your comment is unpublished.
      Daniel Estevam · 4 years ago
      Thanks my friend. You help me a lot.