Вопрос

I understand from reading a couple of threads that IFERROR in Excel 2003 is preformed by an IF(ISERROR). The code I am trying to replicate from Excel 2007+ is:

=IFERROR(A1, "")

I know there must be a simple solution to translating this to IF(ISERROR), but I have had no avail. Advice would be greatly received.

Это было полезно?

Решение

The Excel 2003 equivalent of =IFERROR(A1,"") is =IF(ISERROR(A1),""). See =IS. But neither version of that formula is very useful. A little more useful would be something like =IF(ISERROR(A1),0) where an error in A1, perhaps resulting from dividing by zero, is elsewhere (ie in the cell with the formula) displayed as 0.

The trouble with the single comma is that if ISERROR() is false (ie A1 is not an error) this returns FALSE - not particularly helpful but relatively confusing!

So these formulae are normally used with another formula instead of A1. That is, one formula is wrapped around another. The later Excel version might have =IFERROR(A1/B1,""). Thus, if A1 contained 1 and B1 2, the result would be 0.5 whereas if A1 then were changed to become #REF! the result would be blank (nothing visible in the cell with the formula). The later version is brief way of writing =IF(ISERROR(A1/B1),"",A1/B1) (still valid in later versions) - which is the Excel 2003 equivalent.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top