Google Sheets IFNA Function: Syntax, Examples & Tips

The IFNA function returns a specified value if a formula results in an #N/A error, otherwise it returns the formula's result.
Google Sheets
IFNA(value, value_if_na)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is an IFNA?
  3. A Practical Example
  4. IFNA Formula
  5. Result of the Formula
  6. Why Use IFNA?
  7. Key Takeaways:
  8. Example use case

Parameters

value:
The value or expression that you want to check for an error (specifically, #N/A).

value_if_na:
The value to return if the value results in an #N/A error.

What is an IFNA?

The IFNA function in Google Sheets is a useful tool that allows you to handle errors that may arise from other functions, particularly when using lookup functions like VLOOKUP or HLOOKUP. It specifically checks if the result of a formula is the #N/A error and lets you specify a custom value to return if that error occurs. This makes your spreadsheets more robust and user-friendly by preventing error messages from cluttering your data.

In simpler terms, IFNA helps you manage errors gracefully by providing an alternative output when a lookup fails to find a match.

A Practical Example

Imagine you are managing a list of employees and their respective departments stored in a Google Sheets document:

Employees Table:

EmployeeIDEmployeeNameDepartment
1John DoeSales
2Jane SmithMarketing
3Bob JohnsonIT

Attendance Table:

AttendanceIDEmployeeIDDaysAbsent
112
231

You want to find the department of each employee listed in the Attendance Table. If an employee ID does not exist in the Employees Table, you want to display "Not Found" instead of an error.

IFNA Formula

To achieve this, you would use the IFNA function in conjunction with VLOOKUP as follows:

Google Sheets
=IFNA(VLOOKUP(B2, Employees!A:C, 3, FALSE), "Not Found")

In this formula:

  • B2 is the cell containing the EmployeeID from the Attendance Table.
  • Employees!A:C is the range where the function will look for the EmployeeID in the Employees Table.
  • 3 indicates that the function should return the value from the third column (Department).
  • "Not Found" is the value that will be returned if there is no match found.

Result of the Formula

When you apply the IFNA formula to the Attendance Table, the output would look like this:

AttendanceIDEmployeeIDDaysAbsentDepartment
112Sales
231IT

If you were to add a row for an employee that doesn't exist, such as EmployeeID 4, the result would still show "Not Found" as follows:

AttendanceIDEmployeeIDDaysAbsentDepartment
112Sales
231IT
340Not Found

In this case, if you input EmployeeID 4 in the Attendance Table, the IFNA would return "Not Found" since there is no corresponding entry in the Employees Table.

Why Use IFNA?

IFNA is beneficial because it enhances the clarity of your data by preventing error messages from appearing in your spreadsheets. It allows you to provide meaningful feedback when a lookup fails, making your data easier to interpret. This is particularly useful in reports and dashboards where clarity is essential.

Key Takeaways:

  • IFNA: A function that checks for the #N/A error and allows you to return a custom value if that error occurs.
  • Error Management: Helps in managing errors gracefully, improving the user experience of your spreadsheets.
  • Common Use Cases: Ideal for data retrieval scenarios where lookups may fail, such as employee records, product inventories, and more.

IFNA is an essential function for anyone working with data in Google Sheets, providing a powerful way to enhance data integrity and usability.

Happy spreadsheeting!

Example use case

You have a sales report where Column A lists product IDs and Column B contains sales figures. Using the IFNA formula, you can handle errors when looking up product IDs that don't exist, ensuring your report displays "Not Found" instead of an error message.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.