Dashboard Mode - IFERROR and IFNA
Goal
Find total sales per product and handle errors gracefully when data is missing or incorrect.
Find total sales per product and handle errors gracefully when data is missing or incorrect.
| Product | Sales Q1 | Sales Q2 | Sales Q3 |
|---|---|---|---|
| Apples | 100 | 150 | 200 |
| Bananas | 80 | #N/A | 120 |
| Cherries | 50 | 70 | #ERROR! |
| Dates | #N/A | 60 | 90 |
| Elderberries | 40 | 50 | 60 |
=IFERROR(B2+C2+D2, 0)=IFNA(B3+C3+D3, 0)=IFERROR(B2+C2+D2, 0) and drag down.=IF(ISERROR(B2+C2+D2), "Error Found", "No Error")+----------------------+----------------------+----------------------+ | Sample Data | Total Sales (IFERROR) | Total Sales (IFNA) | | (Table with products)| (KPI cards/table) | (KPI cards/table) | +----------------------+----------------------+----------------------+ | Error Check Column | | | +----------------------+----------------------+----------------------+
Add a filter to select a product name. When you pick a product, the total sales with IFERROR and IFNA update to show only that product's data. The error check column also updates to show if that product has errors.
If you filter to show only "Bananas", which have a missing value (#N/A) in Q2, what will the total sales show using IFERROR and IFNA formulas? Which error check message appears?
IFERROR function do in Google Sheets?#DIV/0!, #VALUE!, or #N/A.IFNA in Google Sheets?=IFNA(value, value_if_na), where it returns value unless it is #N/A, then it returns value_if_na.#N/A, so value_if_na is correct.=IFERROR(A1/B1, "Error") where A1=10 and B1=0, what will be the result?#DIV/0! error.=IFNA(VLOOKUP("Apple", A2:B5, 2, FALSE), "Not found") but it always returns "Not found" even when "Apple" is in the list. What is the likely problem?#N/A errors, so if VLOOKUP can't find "Apple" in the specified range, it returns #N/A, triggering IFNA to show "Not found".A1 by B1, but if B1 is zero or empty, it should show "Invalid". Also, if the division results in #N/A, it should show "Missing data". Which formula correctly does this?IF(B1=0, "Invalid", ...) to check if B1 is zero or empty and return "Invalid" immediately.A1/B1 inside IFNA(..., "Missing data") to replace only #N/A errors with "Missing data".=IF(B1=0, "Invalid", IFNA(A1/B1, "Missing data")) first checks divisor, then handles #N/A errors properly.Pass the test and this pattern moves unknown