A brief analysis of the usage of sumif() and countif() in Excel function learning
When we use Excel to create tables to organize data, we use its built-in functions to assist operations, which can improve operational efficiency. Today we will learn how to use Excel functions. Let’s first learn about the application of sumif and countif functions. I hope it will be helpful to everyone!
Part 1: How to use the sumif function
The Sumif function is to specify a pair based on given conditions Cell sum.
First of all, we use a simple data to understand how to use the Sumif function. The picture below is a worksheet source data.
Use the SUMIF function to find the cells in column A that are greater than 15, and sum them with their corresponding cells in column B.
Enter in the evaluation cell: =SUMIF(A1:A4,">15",B1:B4)
, and the result is 900.
The meaning of the formula is that because the data in A2, A3, and A4 meet the condition ">15", the corresponding data in B2, B3, and B4 are summed and calculated.
The syntax of the SUMIF function is: SUMIF(range,criteria,sum_range)
The parameters are introduced as follows:
First, range: is the range of cells to be calculated based on conditions. Cells in each range must be numbers and names, arrays, and references containing numbers. Empty values and text values are ignored.
Second, Criteria: The conditions for determining which cells to add, which can be in the form of numbers, expressions or text. For example, the condition could be expressed as 65, "65", ">65", or "apples".
Third, Sum_range: is the actual cells to be added (if the relevant cells in the range meet the conditions). If sum_range is omitted, cells in the range are both evaluated conditionally and added when they match the condition.
Sumif function supports wildcard calculation. You can use wildcard characters, question marks (?), and asterisks (*) in criteria. A question mark matches any single character; an asterisk matches any string of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
Part 2: Application case analysis of sumif function and COUNTIF function
First question: The SUMIF function is used to find And, the COUNTIF function is used for counting. Use these two functions for summation and counting applications respectively.
#1. Column C of the following worksheet is the source data. Find the number greater than 50 and less than 100.
The formula is: =COUNTIF($C2:$C10,">"&E2)-COUNTIF(C2:C10," >"&F2)
, the result is 4.
You can also nest the SUM function to calculate, the formula is: =SUM(COUNTIF(C2:C10,{">50",">=100"})*{1,-1} ).
2. Find the sum greater than 50 and less than 100.
For summation, we only need to replace COUNTIF in the above formula with the sumif function.
The formula is: =SUMIF($C2:$C10,">"&E2)-SUMIF(C2:C10,">"&F2)
, the result is: 274 .
Or use the array formula: =SUM(COUNTIF(C2:C10,{">50",">=100"})*{1,-1})
, three keys to end.
Second question: The picture below is a source data, E33, F33 are calculation conditions, complete the following questions.
1. Find the sum of the quantities corresponding to the cell values of model A04 and A03.
You can apply sumif (area, condition, summation area), and the formula is: =SUMIF(C22:G30,E33,D22:H30) SUMIF(C22:G30,F33,D22: H30), the result is: 745.
Or use the array formula: =SUM(SUMIF(C22:G30,E33:F33,D22))
, end with three keys.
2. Find the quantity corresponding to the cell values of models A04 and A03.
The basic principle of finding the number is the same as that of summation, but the functions are different. Therefore the formula is: =COUNTIF(C22:H30,E33) COUNTIF(C22:H30,F33)
or use the array formula =SUM(COUNTIF(C22:G30,E33 :F33))
, three keys to end.
3. Find the sum of the quantity of products whose model numbers start with A but do not include A03.
Both the SUMIF and COUNTIF functions support wildcard characters, and you can use wildcard characters, question marks (?) and asterisks (*) in conditions. A question mark matches any single character; an asterisk matches any string of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
Formula analysis:
Use the SUMIF function to find the total quantity starting with A. The formula is: =SUMIF(C22:G30,F33,D22)
, and then subtract the value of A03 from this value to get the value other than A03.
The formula is: =SUMIF(C22:G30,"A*",D22)-SUMIF(C22:G30,F33,D22)
, and the result is: 998.
Related learning recommendations: excel tutorial
The above is the detailed content of A brief analysis of the usage of sumif() and countif() in Excel function learning. For more information, please follow other related articles on the PHP Chinese website!

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Atom editor mac version download
The most popular open source editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools
