Excel中averageif函数使用的有关介绍
相关话题
excel中函数众多,常见的就有10个左右。此处介绍一个选定条件的单元格平均值公式----averageif。今天,小编就教大家在Excel中averageif函数使用的有关介绍。
Excel中averageif函数使用的有关介绍如下:
1、averageif函数定义:返回某个区域内满足给定条件的所有单元格的平均值(算术平均值)。函数参数:range,ctateria,average-range。
其中,range参数是指定要算平均值的单元格或者单元格区域。
ctateria参数是给定您要做出选择的条件,类似的有>100,≠12等。
average-range参数是要算平均值的实际单元格。

2、从上知道了average-range参数是实际要计算的单元格区域,那如果这一项不填的话,函数出默认忽略它进行处理。如果average-range输入的单元格是空的,或者不在range的区域范围的话,则将报错#DIV0!。如下面的图所示。




3、如果range函数中出现空值或者文本值的话,函数会报错#DIV0!。这点很好理解,如果所选区域都不存在的话,函数拿什么来处理呢!


4、如果区域中没有满足条件的单元格,函数也将会报错#DIV0!。这点是显而易见的,就表示没有查询到的结果。


5、如果criteria参数中的单元格为空单元格,系统将默认为0.如果单元格没有0的话就将报错#DIV0!,如下面两图所示。


6、averageif函数中应用非常广泛的通配符。学过计算机编程语言的朋友应该很清楚,计算机语言有很多通配符,比如?和*等。?代表是允许为任意一个字符,*代表允许为任意的多个字符。

averageif函数难点示例
1、有些表格不会都像上面列举的那样只有1列,针对有多列的情况那该是怎样计算的。其实也是比较简单的。如下表中的数据,第一列是地区,第二列是数字,如果range参数区域是:B4:B11,criteria参数为>5,average-range参数为C4:C11,那这样的话结果会怎样呢?过程是这样的,range函数只是起到一个选定B4到B11这一串区域的作用,crateria参数起到一个条件的作用,averageif则是真正要求平均值的区域。具体演示过程和结果如下:此结果是求地区大于4的数字的平均值。公式为:=AVERAGEIF(B4:B11,">5",C4:C11)




2、通配符*的应用。如下列图中的第一张图,如果要求出包含朝鲜二字的所有地方的数字的平均值,就可以使用此函数,具体公式为=AVERAGEIF(B4:B13,"=*朝鲜",C4:C13),此处的*可以表示一个或多个字符,在此案例中表示的则是“南”和“北”两字,不难得出结果。




通配符<>的应用。
1、此通配符实际上是表示≠这个字符的,也就是“不等于”。相信学了上面的例子之后此通配符应该很好理解,就是表示“不等于朝鲜”的条件,具体操作如下图所示。


关于average-range区域的判断。
不知大家有没有想过如果range和average-range的区域不一样,那该怎么判断处理的区域呢?主要包含以下四种情况,分别对应以下四图:
1.range为A1:A6,average-range为B1:B6,那么实际区域为B1:B6;
2.range为A1:A6,average-range为B1:B4,那么实际区域为B1:B6;
3.range为A1:B4,average-range为C1:D4,那么实际区域为C1:D4;
4.range为A1:B6,average-range为C1:D3,那么实际区域为C1:D6;
总之,判断原则是:1.列数的格式和average-range,如上面四个例子都是BB,或者CD,和 average-range的字母是一样的。
2.如果average-range没有range那么“高”的话,实际区域以range的 高度为准,如第二种和第四种情况都是如此。




averageif函数的终极应用。
1、学到了以上的知识后不知道大家有没有想过如果条件中有多个通配符能不能实现呢?答案是可以的。还是之前这个例子,如果我想求出没有“朝鲜”二字的所有地区的数字平均值,只需在条件中输入<>*朝鲜就能实现了,具体的公式为=AVERAGEIF(B4:B11,"<>*朝鲜",C4:C11)




Excel中averageif函数使用的有关介绍的评论条评论