![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk50Vg8XOeiGsYRfOhqeL8CMjOU-dbJOuP53e5QRlI4-FY0-v-FXs08gI9U7gxP-wzfBKFNqa5clp0V5kjhaE0SQy9_tZR3qtywOsQfK_fBozQDVpCPY17k4DZ0j3dBiTzh4Xx2N22DUAc_65LUo0pML5drFuo44DXSmcAZrnWGq7scdPchFoZAEnm/s16000/exceljet%20ifna.png)
Purpose
Trap and handle #N/A errors
Return value
The value supplied for #N/A errors
Arguments
value - The value, reference, or formula to check for an error.
value_if_na - The value to return if #N/A error is found.
Syntax
=IFNA(value, value_if_na)
Example
The IFNA function can be used to trap #N/A errors that may occur with the VLOOKUP function. In the example shown, the formula in F5, copied down, is:
=IFNA(VLOOKUP(E5,xtable,2,0),"Not found")
where xtable is the named range B5:C12. When the lookup value in column E is found in xtable, VLOOKUP returns the exchange range normally. When the lookup value is not found, VLOOKUP returns #N/A, and IFNA catches this error and returns "Not found".
0 Nhận xét