- Why does N(TRUE) return 1 and N(FALSE) return 0?
- In spreadsheets, TRUE and FALSE are boolean values. N() converts them to their numeric equivalents: TRUE becomes 1 (representing an on/active state), FALSE becomes 0 (representing an off/inactive state). This is standard in most spreadsheet systems and programming languages.
- What happens when N() receives text that is not a number?
- N() returns 0 for most non-numeric text. For example, N('apple') returns 0. If the text contains an error (like the result of a failed VLOOKUP), N() returns that error instead. To handle text carefully, pair N() with IFERROR().
- Can N() convert currency text like '$50.00' to a number?
- No, N() cannot parse currency symbols, commas, or percentage signs. It will return 0. If you need to extract numbers from formatted text, use SUBSTITUTE() to remove the symbols first: =VALUE(SUBSTITUTE(A1, '$', ''))
- Why would I use N() instead of just referencing the cell directly?
- N() is useful when you're unsure of a cell's format or want to guarantee a numeric result before calculations. For instance, if a column contains a mix of numbers and text, N() ensures a numeric output or 0, preventing unexpected calculation errors or text-in-numbers warnings.