How to Use SUMIF with Multiple Columns in Google Sheets

To use SUMIF with multiple columns in Google Sheets, you can use an array formula that combines SUMIF with other functions like IF and ARRAYFORMULA. This allows you to sum values in multiple columns based on specific criteria.

Here's a step-by-step guide on how to use SUMIF with multiple columns:

  1. Open your Google Sheet or create a new one.
  2. Organize your data in columns, including the criteria column and the columns you want to sum.
  3. In a blank cell, enter the following formula:
=ArrayFormula(SUM(IF((A:A="Criteria")*(B:B+C:C))))

Replace "A:A" with the range of criteria cells, "Criteria" with the specific criteria you want to match, "B:B" with the range of values in the first column you want to sum, and "C:C" with the range of values in the second column you want to sum. You can also modify the formula to include more columns to sum.

  1. Press Enter to get the sum of values in the specified columns that meet the criteria.

For example, let's say we have a table with sales data for different products, and we want to calculate the total sales for a specific product from two different columns (Column B: Online Sales, Column C: In-store Sales):

  A      |   B   |   C  
1 Product | Online Sales | In-store Sales
2 Item1   |      10      |       15
3 Item2   |      20      |       25
4 Item1   |      30      |       35
5 Item3   |      40      |       45
6 Item1   |      50      |       55

In this case, we want to calculate the total sales for "Item1" from both online and in-store sales. We can use the following formula:

=ArrayFormula(SUM(IF((A2:A6="Item1")*(B2:B6+C2:C6))))

The result will be 160.

Did you find this useful?