IFNA and IFERROR Functions

 

Step-by-Step Process to Use IFNA and IFERROR Functions

๐Ÿ”น Method 1: Using IFNA to Handle #N/A Errors

Scenario: Lookup values that might not exist

Let's say we have a Product List and we want to check the price using VLOOKUP.

๐Ÿ”น Sample Data (A1:B5)

ProductPrice (โ‚น)
Shoes500
Bags300
Shirts400
Jeans600

๐Ÿ”น Formula to Lookup Price in Cell D2 

=VLOOKUP(D2, A1:B5, 2, FALSE)

If we search for a product that doesn't exist (e.g., "Hats"), we get #N/A.

โœ” Solution: Using IFNA to Replace #N/A 

=IFNA(VLOOKUP(D2, A1:B5, 2, FALSE), "Not Found")

โžก If the product is not found, it will return "Not Found" instead of #N/A.


๐Ÿ”น Method 2: Using IFERROR to Handle Multiple Errors

Scenario: Preventing Division Errors

Let's say we have Total Sales and Number of Customers.

๐Ÿ”น Sample Data (A1:B5)

Sales (โ‚น)Customers
1000050
500025
120000
800040

๐Ÿ”น Formula to Calculate Average Sales Per Customer 

=A2/B2

If B3 contains 0, Excel returns a #DIV/0! error.

โœ” Solution: Using IFERROR to Handle Errors 

=IFERROR(A2/B2, "Invalid Data")

โžก If thereโ€™s an error (like division by zero), it returns "Invalid Data" instead of showing #DIV/0!.


๐ŸŽฏ Key Takeaways

๐Ÿ”น Use IFNA when dealing with #N/A errors from lookup functions like VLOOKUP, HLOOKUP, or XLOOKUP.
๐Ÿ”น Use IFERROR to catch all errors (#N/A, #VALUE!, #DIV/0!, #REF!, etc.).
๐Ÿ”น Enhances reports by replacing errors with meaningful messages.

Would you like me to create an Excel file with sample formulas for practice? ๐Ÿ˜Š