|
当表格中的数据不是连续显示时,如何跳开其它单元格把数据计算出平均值呢?其中运用到SUBTOTAL函数。

工具/原料
excel 2007方法一
以下图中数据为例演示操作方法。
现在,要计算出员工的平均工资,得出的结果显示在E2单元格。
从表格中可以看到,D列数据中插有“合计”的数据。所以我们要跳开“合计”的数据,再进行计算员工的平均工资。

在E2单元格点下,然后,在编辑栏输入:=AVERAGE(
然后,光标放在D2单元格上,点住往下拖到D4单元格,即选择了D2至D4单元格。

接着,左手,按住键盘的CTRL键,右手把光标移到D6单元格,点住不放手,拖到D9单元格,即选择了D6至D9单元格。
同样操作,再选择D11至D13单元格。然后,在公式上加上“)”号,公式即编写好。如下图所示。

按回车键,即得出结果。
跳开了“合计”的数据,计算出平均值。

方法二
除了上面的方法,还有另一个方法。
先把“合计”的数据隐藏。


点下E2单元格,然后,在编辑栏输入公式:=SUBTOTAL(101,D2:D12)

按回车键,即得出平均值,跳开了“合计”的数据,计算出平均值。如下图所示。
