Newbies always like to complain, "Excel has too many functions and I can't remember them. Is there a function that can summarize the functions of many functions?" I'll be honest with you. Say, there really is! The biggest function of the function we are going to talk about today is that it can replace 11 functions. In addition, it can also change the final calculation result based on different filtering results! How about it? Doesn’t it just sound awesome? Without further ado, let’s take a look with the editor!
Ignore the filtered row summation
"Teacher Miao, I encountered a problem", Xiaobai came to me as soon as she got to work, she Said: "I have a table of totals. I don't want to print the content of certain people when printing, so I hide them with filters. However, the summing area must be changed every time I sum, which is always troublesome."
I said: "That's easy, just change the summation function. Don't use SUM, try SUBTOTAL."
Xiaobai: "What kind of function is this? I've never used it before."
I said: "This function is much more powerful than the SUM function. It can handle several summation scenarios!"
Xiaobai: "It's so powerful, then you have to teach me."
"Then let me tell you in detail~ First, let's solve the problem with your form." After saying that, I opened her form, as shown in the picture.
"Now, your table uses the SUM function for summation. Let's replace it with the SUBTOTAL function. You can take a look again." After that, I entered the formula in cell A7.
=SUBTOTAL(9,A2:A6)
"It's really changed!" Then Xiaobai filtered some more In other fields, she found that she could get the results she wanted, and she was very happy. But then she discovered the New World, "Then what does this 9 mean?"
Me: "This 9 means to ignore the unfiltered data and only sum the filtered results."
Xiaobai: "Listen to what you said, are there other numbers that represent other meanings?"
Me: "Of course, then I will tell you about the meanings of other numbers. !"
Ignore hidden row summation
We sometimes encounter this situation. There is a column of numbers and we need to hide several different numbers. The data to perform operations on. If you use SUM directly, you cannot get the correct results, as shown in the figure.
Even if you use the parameter "9" of the SUBTOTAL function you just learned, it cannot be achieved, as shown in the figure.
At this time we have to consider changing a parameter.
The following parameter is "109", come on!
Formula: =SUBTOTAL(109,A1:A5)
As shown in the figure below, change the first parameter of the SUBTOTAL function to After it is "109", you can easily get the summation result after ignoring the hidden rows! as the picture shows.
The function of parameter "109" is to sum the visible values. It can sum the hidden data or the filtered data. The parameter "9" can only be used in filtered rows and has no effect on hidden rows.
Application of other parameters of SUBTOTAL
SUBTOTAL is not limited to the field of summation, average, maximum, standard deviation, and variance are all You can find it, just change its first parameter. For example, now we want to count the maximum value of ignored hidden rows, as shown in Figure 6.
Formula: =SUBTOTAL(104,A1:A5)
##
##After hiding the maximum value "8", the currently visible maximum value "7" is directly obtained in cell A6.
Then why is it 104? In fact, there is a set of number representation rules in the SUBTOTAL function. Today we will talk about the other parameters, including 11 functions such as average, maximum, minimum, standard deviation, and variance. Some are commonly used and some are not commonly used. You can choose based on your own needs. Below is a comparison table of 11 parameters.
Ignore filtered values when calculating |
Ignore hidden rows and filtered values when calculating |
Function |
Corresponding function |
##1 | 101 | AVERAGE | AVERAGE |
102 | Count the number of cells containing numbers | COUNT | |
103 | Calculate the number of non-empty cells | COUNTA | |
##104 | Maximum | MAX | |
105 | Minimum value | MIN |
|
6 |
106 |
Multiplication |
PRODUCT |
##7 | ##107Calculate sample standard deviation | STDEV | |
108 | Calculate population standard deviation | STDEVP | |
109 | SUM | SUM | |
##110 |
Calculate sample variance |
VAR |
11 |
111 |
Calculate population variance |
VARP |
##Expansion Part 1: Only statistical classification and summary
When we are making tabulations, we often encounter such a summary situation, sub-summarizing in the same table, as shown in the figure shown.Expansion Part 2: Uninterrupted Serial Number
"After we understand the characteristics of the SUBTOTAL function, You can use it to do something, such as numbering a list.""What, can't the list number just be pulled with the mouse?""It's different~my number , but it’s automatic! Whether you delete rows or hide rows, the numbers can be rearranged automatically!”“It’s so magical, then I have to learn it hard.”In fact, it is very Simple, suppose I have a list, and the serial number column is currently empty, as shown in the picture.=SUBTOTAL(103,B$2:B2), then drop down to fill in, and you will get what we want serial number. as the picture shows.
=SUBTOTAL(103,B$2:B2)
- 103: Looking at the above parameter comparison table, we can see that the function of 103 is to ignore hidden rows and filtered values, and count the number of non-empty cells.
- B$2:B2: The area in cell A2 is B$2:B2. The purpose is to count the number of non-empty cells in the B2:B2 area, and the result is 1. After the formula is pulled down, the area in cell A3 becomes B$2:B3, then the number of counted non-empty cells becomes two, and the result obtained is 2. as the picture shows.
The above is the detailed content of Excel function learning is one against ten SUBTOTAL functions!. 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

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Zend Studio 13.0.1
Powerful PHP integrated development environment

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

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.