SUBTOTAL函数可以对指定范围内的数据进行分类求和。其语法为:SUBTOTAL(function_num,ref1, [ref2], ...) 优点:能够根据不同的分类进行求和,满足数据分析的需求。 缺点:需要指定分类方式,不如SUMIFS函数灵活。 █AVERAGE、MEDIAN、MAX、MIN等其他求和函数 除了基本的SUM函数之外,Excel还提供了许多其他求和函数,如AVE...
function v(a,b) v=a*b end function 关闭,回到EXCEL工作表界面,输入公式 =V(B1,C1), 如果B1=9,C1=9,则自定义函数执行结果为B1*C1=81(就是代码中的a*b)。完毕之后点文件-另存格式为-加载宏。 宏的保存与调用:菜单 — 文件 — 另存为保存类型选 — 加载宏.xla;菜单 — 工具 — 加载宏,找出V ...
语法: =SUBTOTAL(函数序列号9,求和区域) AVERAGE 场景:平均值 语法: =AVERAGE(数字1,数字2,数字3) =AVERAGE(求平均值区域) AVERAGEIF 场景:单条件求平均值 语法:=AVERAGEIF(条件区域,条件,平均值区域) AVERAGEIFS 场景:多条件求平均值 语法:=AVERAGEIFS(平均值区域,条件区域-1,条件-1,条件区域-2,条件...
SUMIFS--按多个条件对指定单元格求和 SUMPRODUCT--计算数组元素的乘积之和 舍入公式 INT--返回永远小于等于原数字的最接近的整数 ROUND--按指定位数对数字进行四舍五入 round(123.456,-2)=100,round(123.456,1)=123.5 ROUNDDOWN--以绝对值减小的方向按指定位数舍入数字 ROUNDUP--以绝对值增大的方向按指定位数舍入...
awaitExcel.run(async(context) => {letfunctionResult = context.workbook.functions.sampleFunction(); functionResult.load('value');awaitcontext.sync();console.log('Result of the function: '+ functionResult.value); }); 提示 有关可以使用 Excel JavaScript API 调用的函数列表,请参阅本文的支持的工作...
SUBTOTAL Function SUM Function SUMIF Function SUMIFS Function SUMPRODUCT Function SUMSQ Function SUMX2MY2 Function SUMX2PY2 Function SUMXMY2 Function TRUNC Function Trigonometric Functions Trigonometric Functions ACOS ACOSH Function ACOT Function ACOTH Function ...
As an example of the SUBTOTAL function, we'll sum the total of sales in the cell range B2 through B4 using this formula: =SUBTOTAL(9,B2:B4) For this next example, we hid rows 4 and 5. Using this first formula, we can obtain our sum using the number 9 for the first argument to...
subtotal(functionNum, values) 返回列表或数据库中的分类汇总。 sum(values) 对某单元格区域中的所有数字求和。 sumIf(range, criteria, sumRange) 添加由给定条件或条件指定的单元格。 sumIfs(sumRange, values) 添加由一组给定条件或条件指定的单元格。 sumSq(values) 返回参数的平方之和。 参数可以是数字、数...
A number indicating the aggregation function to be used by the method. Arg2 Range The first Range object for which a subtotal is to be calculated. Arg3 Object Arg3 –Arg30 Subsequent Range objects for which a subtotal is to be calculated. Arg4 Object Arg5 Object Arg6 Object Arg...
SUBTOTAL Math and trigonometry: Returns a subtotal in a list or database SUM Math and trigonometry: Adds its arguments SUMIF Math and trigonometry: Adds the cells specified by a given criteria SUMIFS Math and trigonometry: Adds the cells in a range that meet multiple criteria SUMPRODUCT...