AVERAGEIF(range,criteria)公式忽略数据中的错误 [英] AVERAGEIF(range, criteria) formula that ignores errors in the data

查看:455
本文介绍了AVERAGEIF(range,criteria)公式忽略数据中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您想平均一个数字范围但是想使用AVERAGEIF()函数忽略错误,您如何指定条件?



例如,给定数据如下:

  A1:1 
A2:#DIV / 0!
A3:#VALUE!
A4:5
A5:0

我想使用AVERAGEIF范围,标准)公式如下:

  = AVERAGEIF(a1:a5和(&# 0!,#VALUE!))

= AVERAGEIF(a1:a5,<> Error())

有没有办法指定排除错误的条件?我期望从范围的答案是2,三个有效数字的平均值(1,5和&0)。



我通过搜索找到那里是使用数组公式或其他函数来做到这一点的一种方式,但是我想知道是否有一种方法可以在没有数组公式或使用另一个函数的情况下执行此操作。基本上,您可以在条件中指定忽略错误。例如,我可以忽略一个这样的错误:

  AVERAGEIF(a1:a5,#DIV / 0 !)

但是我不知道如何指定忽略任何错误。所以我的问题是一个标准问题。我正在使用Microsoft Excel 2013。

解决方案

只要数据中没有任何负数,这将工作;

  = AVERAGEIF(A1:A5,> = 0)
/ pre>

How do you specify the criteria if you want to average a range of numbers but want to ignore errors using the AVERAGEIF() function?

For example, given the data below:

A1: 1
A2: #DIV/0!
A3: #VALUE!
A4: 5
A5: 0

I want to use the AVERAGEIF(range, criteria) formula something like this:

=AVERAGEIF(a1:a5,and("<>#DIV/0!","<>#VALUE!"))
                    or
=AVERAGEIF(a1:a5,"<>Error()")

Is there a way to specify a criteria to exclude errors? The answer I expect from the range is 2, the average of the three valid numbers (1, 5, & 0).

I found, via searches, that there is a way to do this using an array formula or other functions, but I want to find out if there is a way to do this without an array formula or using another function. Basically, can you specify in the criteria to ignore errors. For example, I can ignore one error like this:

AVERAGEIF(a1:a5,"<>#DIV/0!")

But I don't know how to specify to ignore any errors. So my question is a criteria question. I'm using Microsoft Excel 2013.

解决方案

This will work as long as there aren't any negative numbers in your data:

=AVERAGEIF(A1:A5,">=0")

这篇关于AVERAGEIF(range,criteria)公式忽略数据中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆