Forum Discussion
Inconsistency between formula and graphing #NA, "" and blank cells
You're right, there can be inconsistencies in how Excel handles different cell values, specifically regarding #NA, empty cells, and cells containing "". Here's a breakdown of the observed behaviors and potential explanations:
Formulas vs. Graphing:
- #NA: Formulas typically propagate #NA when encountering it in references, as it signifies an error or unavailable data. This behavior ensures that downstream calculations don't produce misleading results due to errors.
- Empty cells and "": Formulas generally treat empty cells (no value entered) and cells containing "" (empty string) the same way, often ignoring them in calculations like SUM, AVERAGE, etc. This is because an empty cell doesn't hold any meaningful data, and "" explicitly represents an empty string value.
- Graphing: Graphing behavior can differ from formulas. While empty cells are usually excluded from graphs, cells containing "" are often treated as 0. This might be due to simplifying assumptions for visual representation:
- Empty cells likely indicate missing data, so excluding them from the graph makes sense.
- Cells containing "" might imply an intentional placeholder or zero value, justifying their inclusion as 0 in the graph.
Historical Changes:
- Earlier Excel versions might have treated "" differently in graphs, but specific details or reasons for changes are not readily available. It's possible that the current behavior was chosen for consistency with other charting software or to simplify data visualization.
Function-Specific Behavior:
- While many functions treat empty cells and "" similarly, some functions might have specific handling:
- COUNT functions (e.g., COUNTA, COUNTBLANK) explicitly distinguish between empty cells and "" for counting purposes.
- Statistical functions like AVERAGE typically ignore both empty cells and "" when calculating the average. However, some statistical functions might have different handling depending on their specific purpose.
Addressing Inconsistency:
While the observed inconsistencies might seem illogical, it's important to consider the context and purpose of formulas and graphs. Understanding these differences can help you interpret results correctly and potentially adjust your approach if needed.
For example, if you want to exclude both empty cells and cells containing "" from calculations or graphs, you can use functions like ISBLANK or IF statements to handle them explicitly.
Remember, Excel's behavior might evolve over time, so staying updated on any changes or clarifications from Microsoft is recommended
Graphing converts strings to a value - that is programatically incorrect and should be fixed - a When graphing expects a value and receives a string it should be treated as #NA (not a value).
But... the real problem here is that a function can make a decision when they are passed an empty cell and there does not appear to be a method to force a cell to be empty? That is about as useful as write only memory.
-matthew