4 C
London
Friday, December 20, 2024
HomeExcelDescriptive Statistics in ExcelHow to Use SUMIF with OR in Excel

How to Use SUMIF with OR in Excel

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following formulas to combine the SUMIF function with the OR function in Excel:

Method 1: SUMIF with OR (One Column)

=SUM(SUMIFS(B2:B13, A2:A13,{"Value1","Value2", "Value3"}))

This particular formula finds the sum of values in B2:B13 where the corresponding value in A2:A13 contains “Value1”, “Value2”, or “Value3.”

Method 2: SUMIF with OR (Multiple Columns)

=SUMIF(A2:A13,"Value1", C2:C13)+SUMIF(B2:B13,"Value2", C2:C13)

This particular formula finds the sum of values in C2:C13 where the corresponding value in A2:A13 contains “Value1” or the corresponding value in B2:B13 contains “Value2.”

The following example shows how to use each method in practice with the following dataset in Excel:

Example 1: SUMIF with OR (One Column)

We can use the following formula to sum the values in the Points column where the value in the Team column is equal to “Mavs” or “Rockets”:

=SUM(SUMIFS(C2:C13, A2:A13,{"Mavs","Rockets"}))

The following screenshot shows how to use this formula in practice:

The sum of the values in the Points column where the value in the Team column is equal to “Mavs” or “Rockets” is 53.

Example 2: SUMIF with OR (Multiple Columns)

We can use the following formula to sum the values in the Points column where the value in the Team column is equal to “Mavs” or the value in the Position column is “Center”:

=SUMIF(A2:A13,"Mavs",C2:C13)+SUMIF(B2:B13,"Center",C2:C13)

The following screenshot shows how to use this formula in practice:

The sum of the values in the Points column where the value in the Team column is equal to “Mavs” or the value in the Position column is “Center” is 87.

Additional Resources

The following tutorials explain how to perform other common SUMIF operations in Excel:

How to Use SUMIFS with a Date Range in Excel
How to Sum If Cells Contain Text in Excel

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories