Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Excel Tutorial
  • Excel Formulas
  • Excel Shortcut Keys
  • Data Analysis in Excel
  • Formatting in Excel
  • Excel Workbooks
  • Statistical Functions
  • Data Visualization in Excel
  • Pivot Tables in Excel
  • MS Excel Quiz
  • Excel Interview Questions
  • Advance Excel
Open In App
Next Article:
Excel SUMIF Function: Formula, How to Use and Examples
Next article icon

Excel SUMIF Function: Formula, How to Use and Examples

Last Updated : 21 Nov, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

The SUMIF function in Excel is a versatile tool that enables you to sum values based on specific criteria, such as a true or false condition. This feature makes it perfect for conditional summation tasks like totaling sales over a particular amount, adding up expenses in specific categories, or summing scores above a threshold. Whether you're working with Excel formula SUMIF for single criteria or expanding to SUMIFS with multiple criteria, this Excel tutorial will show you how to efficiently filter and sum data.

In this article, we’ll explain SUMIF function in Excel and demonstrate how to use SUMIF with multiple criteria, along with Excel SUMIF examples that showcase its flexibility.

SUMIF Function in Excel with Examples
SUMIF Function in Excel with Examples

Table of Content

  • What is the SUMIF Function in Excel
  • How to Use SUMIF Function in Excel
  • How to Use Excel SUMIF with Dates
  • Example of SUMIF Function
  • How to Use SUMIFS with Multiple Criteria in Spreadsheet

What is the SUMIF Function in Excel

The SUMIF function in Excel allows you to sum data within a specified range based on a single condition, making it an essential part of Excel formulas for tasks like filtering totals by category, date, or other attributes. Whether you need to sum if a certain text or sum if dates fall within a particular range, this function proves to be a handy tool. Advanced scenarios may require combining SUMIF with other functions like MATCH function in Excel or FILTER Excel function for refined data analysis.

Excel Formula SUMIF: Syntax

SUMIF(range, criteria, [sum_range])

This function accepts range, criteria(condition) which checks things like >, <,=, and sum_range(optional argument) as its argument and returns the sum of the sum_range or the range according to the given arguments. The arguments are discussed below.

SUMIF Function Parameters

Arguments of the SUMIF function are the following:

  • range: The range of cells you want to evaluate based on the criteria.
  • criteria: The condition that determines which cells to sum.

Note: sum_range (optional): The range of cells to sum if different from the range to evaluate. If sum range not mentioned, it calculates the sum of same range as criteria condition.

Return Value:

This function sums the numbers in the given range and returns the numerical value of the sum. 

How to Use SUMIF Function in Excel

The SUMIF function is a powerful tool, but it only takes a few simple steps to use it effectively. Here are the following steps to effectively use SUMIF in Excel formula.

Step 1: Open MS Excel

Step 2: Select the Cell for the Result

Select the cell in which you want to display the result of the SUMIF Function.

SUMIF Function in Excel
Select the cell to enter result

Step 3: Enter the SUMIF Function and specify the range

Start typing the Formula starting with the '=SUMIF(' in the selected cell and also specify the range of the cells you want to evaluate. For example, if you want to evaluate cells 'B2' to 'B11', type 'B2:B11',.

SUMIF Function in Excel
Type the Formula

Step 4: Define the Criteria

Enter the criteria for summing the values. For example, if you want to sum cells where the value is "Apple", Select cell E4(Apple).

Step 5: Drag the Formula

Step 6: Preview the Result

SUMIF Function in Excel
Preview the Result

How to Use Excel SUMIF with Dates

The SUMIF function with dates allows you to add values based on specific date criteria, ideal for tracking sales or events within a certain timeframe. For example, to sum all values after January 1, 2023, enter =SUMIF(B2:B11, ">01/01/2023", C2:C11).

Step 1: Open MS Excel

Step 2: Select the Cell

Select the cell in which you want to display the output.

SUMIF Function in Excel
Select a Cell

Step 3: Enter the SUMIF Function and specify the range

Start by typing =SUMIF( in the selected cell and enter the range of cells the dates you want to evaluate. For example, if your dates are in column B from B2to B10, type B2:B10,.

SUMIF Function in Excel
Enter SUMIF function and specify range

Step 4: Define the Criteria

Enter the date criteria. For instance, if you want to sum values for dates after January 1, 2023, type " >01/01/2023",.

SUMIF Function in Excel
Define the Criteria

Step 5: Enter the Sum Range

Enter the range of cells that contain the values you want to sum. For example, if these values are in column B from B2 to B10, type B2:B10).

SUMIF Function in Excel
Enter the SUM Range

Example SUMIF Function

An Excel sheet has been taken as an example and the SUMIF function has been used in several formats.

Input:

Coding Team names(Column A)No. of members(Column B)points(Column C)
GFG_CODERS4200
Acex_coders5197
Poisionous_python3150
Megatron4130
Bro_coders6110
Kotlin_coders2100
Gaming_coders350

Then we will apply the SUMIF() function to the above table:

SUMIF() functionWhat the function doesOutput result
=SUMIF(B2:B8, ">4", C2:C8)If the no. of members in column B is greater than 4 then add the corresponding points of column C.307
=SUMIF(B2:B8, 4, C2:C8)If the no. of members in column B is equal to 4 then add the corresponding points of column C.330
=SUMIF(A2:A8, "GFG_CODERS", C2:C8)Search for "GFG_CODERS" in column A and add the corresponding points in column C.200
=SUMIF(C2:C8, ">110")Here the sum_range argument is not provided. So it will check the cells of C column and if the points are greater than 110 add it to the result.677
=SUMIF(A2:A8, "*rs", C2:C8)Here it will find the names of the teams ending with "rs" / "RS" in column A and add the corresponding points to the sum.657

Output:

SUMIF Function in Excel
Output of Excel Sheet
  • The Output after using the SUMIF Formula
SUMIF Function in Excel
After Using the SUMIF Formula

How to Use SUMIFS with Multiple Criteria in Spreadsheet

Below are some examples of SUMIF Function in Excel:

Step 1: Enter the data Set

image-
Enter the Data Set

Step 2: Enter the Formula for multiple criteria

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

  • sum_range: The range to add.
  • criteria_range1, criteria1: The first range and condition pair.
  • [criteria_range2, criteria2] (optional): Additional ranges and conditions.

Example : To sum the Sales where Product is "Product A" and Category is "Electronics":

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

image
Enter the Formula

Conclusion

The SUMIF function is an essential tool for anyone working with data in Excel, allowing you to add up values based on specific criteria quickly. With a solid understanding of its syntax and practical applications, you’re now equipped to use SUMIF in various scenarios, from tracking budgets to analyzing sales. Start using SUMIF in your projects to save time and improve the accuracy of your data analysis!


Next Article
Excel SUMIF Function: Formula, How to Use and Examples

T

tenacious39
Improve
Article Tags :
  • Excel
  • ExcelGuide

Similar Reads

    How to use IRR Function in Excel: Formula + Examples
    How to Calculate Internal Rate of Return in Excel: Quick StepsEnter Your Cash FlowsEnter IRR Formula >> Press Enter Preview ResultsEver wondered how businesses decide which projects are worth investing in? The Internal Rate of Return (IRR) is a key financial metric that helps evaluate the prof
    8 min read
    Excel Date Functions with Formula Examples
    There are many functions in Microsoft Excel that may be used to work with dates and timings in Excel. Each function completes a straightforward task, but by combining numerous functions into a single formula, you may handle trickier and more complicated problems. The purpose of discussing DATE funct
    12 min read
    How to Use HLOOKUP in Excel (Formula & Examples)
    Excel HLOOKUP Function - Quick StepsSelect the cell Enter the HLOOKUP formulaInput arguments>>Press Enter Excel is packed with features that make handling and analyzing data easier. One of these handy tools is the HLOOKUP function, which is great for finding information in tables that are orga
    9 min read
    How To Use MATCH Function in Excel (With Examples)
    Finding the right data in large spreadsheets can often feel like searching for a needle in a haystack. This is where the MATCH function in Excel proves invaluable. The MATCH function helps you locate the position of a specific value within a row or column, making it a cornerstone of efficient data m
    6 min read
    Top Excel Formulas and Functions You Should Know 2024
    In the ever-evolving world of data analysis, mastering the top Excel formulas and functions is essential for maximizing productivity and efficiency. As we move into 2024, Excel remains a cornerstone tool for professionals across industries, from finance to marketing so for a better output you have t
    15+ min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences