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
IFS
The IFS function checks specified expressions and returns a value based on the first condition that evaluates to a boolean value of TRUE.
IFS(ifs-expression, ifs-true, ifs-expression…, ifs-true…)
ifs-expression: A logical expression. ifs-expression can contain anything as long as the expression can be evaluated as a boolean value. If the expression evaluates to a number, 0 is considered to be FALSE, and any other number is considered to be TRUE.
ifs-true: The value returned if ifs-expression is TRUE. ifs-true can contain any value. If ifs-true is omitted (there’s a comma, but no value) and ifs-expression evaluates to TRUE, IFS will return 0.
ifs-expression…: An optional logical expression to be evaluated if ifs-expression is FALSE. ifs-expression can contain anything as long as the expression can be evaluated as a boolean value. If the expression evaluates to a number, 0 is considered to be FALSE, and any other number is considered to be TRUE.
ifs-true…: The value returned if ifs-expression… is TRUE. ifs-true can contain any value. If ifs-true… is omitted (there’s a comma, but no value) and ifs-expression… evaluates to TRUE, IFS will return 0.
Notes
If all expressions are FALSE, an error is returned.
You can enter “TRUE” for the last ifs-expression… in your formula, followed by a default value for ifs-true…, to specify the result if all previous expressions (including ifs-expression and all instances of ifs-expression…) evaluate to FALSE.
Examples |
---|
=IFS(A2>91,”A”,A2>82,”B”,A2>73,”C”,A2>64,”D”,TRUE,”F”) returns the letter grade “A” for a number greater than 91, then returns a “B” for a number greater than 82 but less than 92, and so on for all values less than 65, which returns an “F”. Let A2 contain "A dog" Let A1 = COUNTMATCHES(A2, REGEX("\w+")) =IFS(A1 = 0, "No word", A1 = 1, "One word", A1 = 2, "Two words", A1 > 2, "Multiple words") returns "Two words". |