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)
Product | Price (โน) |
---|---|
Shoes | 500 |
Bags | 300 |
Shirts | 400 |
Jeans | 600 |
๐น Formula to Lookup Price in Cell D2
If we search for a product that doesn't exist (e.g., "Hats"), we get #N/A.
โ Solution: Using IFNA to Replace #N/A
โก 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 |
---|---|
10000 | 50 |
5000 | 25 |
12000 | 0 |
8000 | 40 |
๐น Formula to Calculate Average Sales Per Customer
If B3
contains 0
, Excel returns a #DIV/0! error.
โ Solution: Using IFERROR to Handle Errors
โก 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? ๐