JavaScript 中的 SUBTOTAL函数

首页 / JavaScript入门教程 / JavaScript 中的 SUBTOTAL函数

描述

SUBTOTAL函数返回列表或数据库中的小计。您可以通过使用Excel中"数据"options卡上"大纲"组中的"小计"命令来创建带有小计的列表。创建小计列表后,您可以通过编辑小计功能对其进行修改。

语法

SUBTOTAL (function_num, ref1, [ref2]...)

争论

Argument 描述 Required/Optional
Function_num

数字1-11或101-111,指定用于小计的功能。

无涯教程网

  • 1-11包含手动隐藏的行
  • 101-111排除了它们

始终会排除过滤出的单元格。查看下面的Function_num表以了解功能。

链接:https://www.learnfk.comhttps://www.learnfk.com/javascript/advanced-excel-math-trignometric-subtotal-function.html

来源:LearnFk无涯教程网

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

Notes

  • 如果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函数设计用于数据列或垂直范围。它不适用于数据行或水平范围。

  • 如果任何参考是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

Example

SUBTOTAL Function

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

SQL必知必会 -〔陈旸〕

消息队列高手课 -〔李玥〕

职场求生攻略 -〔臧萌〕

容器实战高手课 -〔李程远〕

手把手教你玩音乐 -〔邓柯〕

etcd实战课 -〔唐聪〕

零基础实战机器学习 -〔黄佳〕

深入C语言和程序运行原理 -〔于航〕

深入浅出可观测性 -〔翁一磊〕

好记忆不如烂笔头。留下您的足迹吧 :)