N(): in effect returns number values / booleans as number and anything else as 0 (excluding underlying errors)
Formula Nulls are 0 length text strings and they can not be coerced to a number directly, eg:
By using N to convert the Null prior to coercion we avoid the #VALUE! error.
In this instance you could equally use SUM as we did for O6:P6 where you have the potential for the same problem (Nulls in O)
(we used SUM there as you had a contiguous range to aggregate)
Re; Custom Number Format ex. using O
Custom Format applied to O6:O999 of: #,##0.00;-#,##0.00;;@
at this point the 0 persists but is not visible / does not print.
Effect of this is that you are no longer mixing data types - Column O will always contain a number (and not mix of numbers and Nulls)
You always remove the need to potentially calculate the SUMIF twice over.
Bookmarks