通过#N / A而不是“”的IFERROR(公式,“”) [英] IFERROR(formula,"") passing #N/A instead of ""

查看:170
本文介绍了通过#N / A而不是“”的IFERROR(公式,“”)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将以下数组公式应用于7行时,它会为第6行和第7行返回#N / A。为什么不使用?

When I apply the following array formula over 7 rows, it returns #N/A for rows 6 and 7. Why is it not using "" instead?

=IFERROR(ROW(A1:A5),"")

当我检查iserror(A6或A7)它报告真实。

when I check with iserror(A6 or A7) it reports true.

推荐答案

这是因为背后的逻辑。 IFERROR 做什么?它通过第二个参数来替换给定数组中的错误条目。

That's because of the logic behind. What does the IFERROR do? it replaces the error entries in the given array, by the second parameter.


=IFERROR(ROW(A1:A5),"")


将生成一个包含5个值的数组。上面没有错误,但是如果您使用的范围可能包含错误和NA,例如

will generate an array with 5 values. There is no error above, but if you were using a range possibly containing errors and NA's, such as


=IFERROR(A1:A5,"")


IFERROR 函数将以替换给定数组中的错误条目。就这样。它不会更改数组的大小

The IFERROR function will replace the error entries in the given array, by "". That's all. It will not change the size of the array.

最后,您将获得一个包含5个条目的数组。超出的条目不会从数组中获取任何值。这就是为什么#N / A

At the end you are getting an array with 5 entries. Entries beyond dont get any values from the array. That's why #N/A is displayed.

这篇关于通过#N / A而不是“”的IFERROR(公式,“”)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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