Catalog

How to Use SUMIF,SUMIFS Function in Google Sheets (With Examples)

November 28, 2023 613 views

Welcome to an effortless journey through Google Sheets! This guide is crafted with you in mind, simplifying the intricacies of SUMIF and SUMIFS functions. Dive into step-by-step tutorials, real-world examples, and expert tips to make spreadsheet navigation a breeze. As a bonus, explore WPS Spreadsheet, a lightweight alternative. Your journey to spreadsheet mastery starts here—no headaches, just simplified excellence!

Part 1: What Is the SUMIF and SUMIFS Function in Google Sheets?

SUMIF

1. SUMIF Function:

The SUMIF function in Google Sheets is useful when you want to sum values based on a specific condition or criteria. It adds up values in a range that meet a specified criterion.

Syntax:

=SUMIF(range, criterion, [sum_range])

  • range: The range of cells that you want to apply the criteria to.

  • criterion: The condition that must be met for a cell to be included in the sum.

  • [sum_range]: (Optional) The actual cells to sum if the corresponding cells in the range meet the criteria. If omitted, the cells in the range are summed.

2. SUMIFS Function:

The SUMIFS function is an extension of SUMIF and allows you to sum values based on multiple criteria. You can specify different conditions for different ranges.

Syntax:

=SUMIFS(sum_range, criteria_range1, criterion1, [criteria_range2, criterion2, ...])

  • sum_range: The range of cells to sum.

  • criteria_range1: The first range to apply criteria1.

  • criterion1: The condition to be met in criteria_range1.

  • [criteria_range2, criterion2, ...]: Additional ranges and criteria to apply.

Example:

Let's say you have a table with sales data. You want to sum the sales for a specific product in the month of January.

  • SUMIF:

=SUMIF(A2:A10, "Product A", C2:C10)

This sums the sales in column C where the corresponding cell in column A is "Product A".

  • SUMIFS:

=SUMIFS(C2:C10, A2:A10, "Product A", B2:B10, "January")

This sums the sales in column C where the corresponding cells in column A are "Product A" and in column B are "January".

Part 2: How to Use the SUMIF Function in Google Sheets?

Example 1 - SUMIFS for Profit Calculation

Step 1: Select an Empty Cell (G2):

Choose the cell where you want the result (G2).

select cell g2

Step 2: Use the SUMIFS Function: Input the formula: excel =SUMIFS(A:A, B:B, "A", C:C, "Profit")

Breakdown:

- sum_range: A:A (column containing values to sum)

- criteria_range1: B:B (team criteria)

- criteria1: "A" (team A)

- criteria_range2: C:C (cash flow type criteria)

- criteria2: "Profit" (profits)

input formula

Step 3: Press Enter: Hit the Enter key to get the sum of profits for Team A.

Press Enter

Example 2 - SUMIF for Director's Earnings

Step 1: Select the Range of Cells to be Summed Up: Choose the range where you want to apply the criterion (e.g., C2:C47 - list of directors).

select range cell

Step 2: Add the Criterion: Input the formula: excel =SUMIF(C2:C47, "Steven Spielberg", F2:F47) Breakdown: - range: C2:C47 (list of directors) - criterion: "Steven Spielberg" (director's name) - sum_range: F2:F47 (column containing earnings)

Step 3: Press Enter: Hit the Enter key to get the total earnings for films directed by Steven Spielberg.

Press Enter

Step 4: Dynamic Formula (Optional): Drag the corner of the cell to apply the same formula to other cells, adapting the criteria accordingly.

These step-by-step instructions without bullets should still be easy to follow. If you have any further questions or need additional clarification, feel free to ask!

Part 3: How to Use the SUMIFS Function to Sum with Multiple Criteria in Google Sheets?

Example 1 - Total Hours Worked by Manufacturing Employees in New York

Step 1: Define Parameters

  • sum_range: E2:E9 (hours worked)

  • criteria_range1: B2:B9 (department)

  • criteria1: "Manufacturing"

  • criteria_range2: C2:C9 (location)

  • criteria2: "New York"

Step 2: Use the SUMIFS Function

  • Type the following formula in the formula bar:

excelCopy code

=SUMIFS(E2:E9, B2:B9, "Manufacturing", C2:C9, "New York")

Step 3: Press Enter

  • Hit the Enter key to get the total hours worked by employees in the Manufacturing department in New York.

result

Example 2 - Sum Numbers with Multiple Sets of Conditions (AND and OR Logic)

Step 1: Define Parameters

Set 1:

  • sum_range: B6:B14 (amounts)

  • criteria_range1: A6:A14 (fruit)

  • criteria1: "apples"

  • criteria_range2: C6:C14 (delivery date)

  • criteria2: "16-Mar-2018"

Set 2:

  • sum_range: B6:B14 (amounts)

  • criteria_range1: A6:A14 (fruit)

  • criteria1: "oranges"

  • criteria_range2: C6:C14 (delivery date)

  • criteria2: "16-Mar-2018"

Step 2: Use the SUMIFS Function

  • Enter the formula as the sum of the two sets:

=SUMIFS(B6:B14, A6:A14, "apples", C6:C14, "16-Mar-2018") + SUMIFS(B6:B14, A6:A14, "oranges", C6:C14, "16-Mar-2018")

OR

=SUMIFS(B6:B14, A6:A14, D1, C6:C14, "16-Mar-2018") + SUMIFS(B6:B14, A6:A14, D2, C6:C14, "16-Mar-2018")

Step 3: Press Enter

  • Hit the Enter key to get the sum of amounts based on the specified conditions.

Result

Part 4: Tips for Use SUMIF and SUMIFS Function

SUMIF:

  1. Closed Workbook Reference: Beware of the #VALUE! error when using SUMIF with references to cells or ranges in closed workbooks. Ensure that the workbook containing the referenced data is open to avoid this error.

  2. String Matching Limitation: Exercise caution when matching strings in SUMIF, as it may yield incorrect results for strings exceeding 255 characters. Consider truncating or finding alternative methods for handling longer strings.

  3. Equal-Sized Ranges: Maintain consistency in range sizes. If your criteria range is, for example, C2:C47, make sure the corresponding sum_range aligns precisely, such as F2:F47 rather than extending to F2:F100.

SUMIFS:

  • AND Logic: Understand that SUMIFS employs AND logic, summing only cells that satisfy all specified conditions. Ensure that each criterion is met for a cell to be included in the sum.

  • Consistent Range Sizes: Avoid #VALUE errors by using equally sized ranges for both sum_range and all criteria ranges. Matching the number of rows and columns is crucial for the proper functioning of your SUMIFS formula.

  • Appropriate Criteria Construction: Tailor your criteria to the nature of your conditions. Depending on your requirements, construct criteria to accurately filter and sum the desired data. This flexibility enhances the effectiveness of your SUMIFS formulas.

Part 5: Best Free Alternative to Google Sheets - WPS Spreadsheet

WPS Office

WPS Spreadsheet stands as a robust and free alternative to Google Sheets, designed to meet the diverse needs of spreadsheet users. Compatible with major office suites, including Microsoft Excel, Google Sheets, LibreOffice Calc, and OpenOffice Calc, WPS Spreadsheet ensures seamless integration into various working environments. It supports widely used file formats such as .xls, .xlsx, .xlsm, .xlt, and .csv, offering flexibility in document handling across platforms.

  1. Compatibility: Fully compatible with Microsoft Excel, Google Sheets, LibreOffice Calc, and more, ensuring smooth collaboration.

  2. Multi-Platform Editing: Edit Excel files on mobile devices, computers, or web pages, providing flexibility for users on the go.

  3. Lightweight Design: Known for its lightweight nature, WPS Spreadsheet offers a fast and streamlined user experience without compromising functionality.

  4. Online Document Support: Facilitates online document editing, promoting real-time collaboration and efficient teamwork.

  5. Safety and Stability: Prioritizes data safety and software stability, providing users with a reliable and secure spreadsheet solution.

Ideal for mobile professionals, collaborative teams, and resource-conscious individuals seeking a reliable and free Excel alternative.

How to Download WPS Office

Step 1: Visit the WPS Office Website

Head to the official WPS Office website by entering the URL in your browser: WPS Office Website.

Step 2: Download WPS Office

On the website's homepage, locate the prominently displayed "Free Download" button. Click on "Free Download" to initiate the download of the WPS Office setup file.

Free Download

Step 3: Install WPS Office

Once the download is complete, locate the downloaded setup file on your device. Launch the setup file to start the installation process. Follow the on-screen instructions provided by the installation wizard to seamlessly install WPS Office on your computer.

Install

Trustpilotstars4.8
WPS Office- Free All-in-One Office Suite
  • Use Word, Excel, and PPT for FREE, No Ads.

  • Edit PDF files with the powerful PDF toolkit.

  • Microsoft-like interface. Easy to learn. 100% Compatibility.

  • Boost your productivity with WPS's abundant free Word, Excel, PPT, and CV templates.

5,820,008 User
avator
Algirdas Jasaitis
logo

FAQs

What is the difference between SUMIF and SUMIFS function?

The main difference lies in the number of conditions. SUMIF is designed for a single condition, where you sum a range based on a specified criterion. On the other hand, SUMIFS allows multiple conditions, summing a range only if all specified criteria are met. While SUMIF has a simpler syntax, SUMIFS provides more flexibility for complex scenarios.

Is there a character limit for criteria in SUMIF/SUMIFS?

While there isn't a strict character limit for criteria in SUMIF/SUMIFS, it's advisable to be cautious with very long criteria strings. Extremely lengthy criteria might impact performance and readability. It's recommended to keep your criteria concise and consider alternative approaches if dealing with extensive or complex conditions.

Summary

In conclusion, mastering Google Sheets becomes a breeze with our guide to SUMIF and SUMIFS functions. From understanding the basics to practical application, we've simplified the process with step-by-step tutorials and real examples.

Don't forget the expert tips to keep you on track. Plus, discover the lightweight WPS Spreadsheet as a handy alternative. Say goodbye to spreadsheet challenges and hello to a more efficient and enjoyable data-handling experience.


15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.