IFERROR(formula,“”) passing #N/A instead of “”

2019-08-02 05:12发布

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),"")

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

1条回答
手持菜刀,她持情操
2楼-- · 2019-08-02 05:34

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),"")

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,"")

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.

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.

查看更多
登录 后发表回答