SUBTOTAL函数返回列表或数据库中的小计。您可以通过使用Excel中"数据"options卡上"大纲"组中的"小计"命令来创建带有小计的列表。创建小计列表后,您可以通过编辑小计功能对其进行修改。
SUBTOTAL (function_num, ref1, [ref2]...)
Argument | 描述 | Required/Optional |
---|---|---|
Function_num |
数字1-11或101-111,指定用于小计的功能。
始终会排除过滤出的单元格。查看下面的Function_num表以了解功能。 |
Required |
Ref1 | The first named range or reference for which you want the subtotal. | Required |
Ref2... | Named ranges or references 2 to 254 for which you want the subtotal. | Optional |
Function_num(包括隐藏值) | Function_num(忽略隐藏值) | 功能 |
---|---|---|
1 | 101 | 平均 |
2 | 102 | COUNT |
3 | 103 | COUNTA |
4 | 104 | MAX |
5 | 105 | MIN |
6 | 106 | 产品 |
7 | 107 | STDEV |
8 | 108 | STDEVP |
9 | 109 | SUM |
10 | 110 | VAR |
11 | 111 | VARP |
如果ref1,ref2…(或嵌套的小计)中还有其他小计,则这些嵌套的小计将被忽略,以避免重复计算。
For the function_num constants from 1 to 11, the SUBTOTAL function includes the values of rows hidden by the Hide Rows command under the Hide & Unhide submenu of the Format command in the Cells group on the Home tab in Excel. Use these constants when you want to subtotal hidden and nonhidden numbers in a list.
对于从101到111的function_Num常量,SUBTOTAL函数将忽略"隐藏行"命令隐藏的行的值。当您只想对列表中的非隐藏数字进行小计时,请使用这些常量。
SUBTOTAL函数将忽略筛选输出中不包含的任何行,无论您使用哪个function_num值。
SUBTOTAL函数设计用于数据列或垂直范围。它不适用于数据行或水平范围。
来源:LearnFk无涯教程网
如果任何参考是3-D参考,则SUBTOTAL返回#VALUE!。误差值
If the specified function_num is not one of the permitted values (an integer between 1 & 11 or between 101 & 111), SUBTOTAL returns the #VALUE! error value.
如果所需的计算涉及除以零(如,查找不包含任何数值的单元格范围的平均值,标准偏差或方差),则SUBTOTAL返回错误值#DIV/0 !.
Excel 2007,Excel 2010,Excel 2013,Excel 2016
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)