Formulas and Functions Help
- Welcome
- Intro to formulas and functions
-
- ACCRINT
- ACCRINTM
- BONDDURATION
- BONDMDURATION
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNUM
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENCYCODE
- CURRENCYCONVERT
- CURRENCYH
- DB
- DDB
- DISC
- EFFECT
- FV
- INTRATE
- IPMT
- IRR
- ISPMT
- MIRR
- NOMINAL
- NPER
- NPV
- PMT
- PPMT
- PRICE
- PRICEDISC
- PRICEMAT
- PV
- RATE
- RECEIVED
- SLN
- STOCK
- STOCKH
- SYD
- VDB
- XIRR
- XNPV
- YIELD
- YIELDDISC
- YIELDMAT
-
- AVEDEV
- AVERAGE
- AVERAGEA
- AVERAGEIF
- AVERAGEIFS
- BETADIST
- BETAINV
- BINOMDIST
- CHIDIST
- CHIINV
- CHITEST
- CONFIDENCE
- CORREL
- COUNT
- COUNTA
- COUNTBLANK
- COUNTIF
- COUNTIFS
- COVAR
- CRITBINOM
- DEVSQ
- EXPONDIST
- FDIST
- FINV
- FORECAST
- FREQUENCY
- GAMMADIST
- GAMMAINV
- GAMMALN
- GEOMEAN
- HARMEAN
- INTERCEPT
- LARGE
- LINEST
- LOGINV
- LOGNORMDIST
- MAX
- MAXA
- MAXIFS
- MEDIAN
- MIN
- MINA
- MINIFS
- MODE
- NEGBINOMDIST
- NORMDIST
- NORMINV
- NORMSDIST
- NORMSINV
- PERCENTILE
- PERCENTRANK
- PERMUT
- POISSON
- PROB
- QUARTILE
- RANK
- SLOPE
- SMALL
- STANDARDIZE
- STDEV
- STDEVA
- STDEVP
- STDEVPA
- TDIST
- TINV
- TTEST
- VAR
- VARA
- VARP
- VARPA
- WEIBULL
- ZTEST
IFERROR
The IFERROR function returns a value that you specify if a given value evaluates to an error; otherwise it returns the given value.
IFERROR(any-expression, if-error)
any-expression: The expression to be tested. any-expression can contain any value.
if-error: The value returned if any-expression evaluates to an error. if-error can contain any value.
Notes
Use IFERROR to handle errors in a formula. For example, if you are working with data where a valid value for cell D1 is 0, the formula =B1/D1 would result in an error (division by zero). This error can be prevented by using a formula such as =IFERROR(B1/D1, 0), which returns the actual division if D1 is not zero; otherwise it returns 0.
Examples |
---|
If B1 is a number value and D1 evaluates to 0, then: =IFERROR(B1/D1, 0) returns 0 because division by zero results in an error. =IF(ISERROR(B1/D1), 0, B1/D1) is equivalent to the previous IFERROR example, but requires the use of both IF and ISERROR. =IF(IFERROR(OR(ISEVEN(B4+B5), ISODD(B4+B5)), FALSE), "All numbers", "Not all numbers") returns the text "All numbers" if both cells B4 and B5 contain numbers; otherwise the text "Not all numbers." This is accomplished by testing to see if the sum of the two cells is either even or odd. If the cell is not a number, the EVEN and ODD functions will return an error and the IFERROR function will return FALSE; otherwise it will return TRUE because either EVEN or ODD is TRUE. So if either B4 or B5 is not a number or a boolean value, the IF statement will return the if-false expression, "Not all numbers"; otherwise it will return the if-true expression "All numbers." |