Returns a specified value if the expression evaluates to an #N/A error, otherwise returns the result of the expression.
ฟังก์ชันนี้ทำงานใน Google Sheets เหมือนกับใน Excel — ไวยากรณ์และอาร์กิวเมนต์เดียวกัน
IFNA(value, value_if_na)The IFNA function is used to trap and handle the #N/A error specifically. It allows you to replace the standard #N/A error with a more meaningful value or message in your spreadsheet. Unlike the IFERROR function, IFNA only targets #N/A errors and ignores other error types like #VALUE! or #REF!.
=IFNA(VLOOKUP("Apple", A1:B10, 2, FALSE), "Not Found")ผลลัพธ์: Not Found
Returns 'Not Found' if the VLOOKUP function cannot find the value 'Apple' in the specified range.
IFNA only handles #N/A errors, while IFERROR handles all error types including #VALUE!, #REF!, #DIV/0!, etc.