A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
The problem is that #N/A is an error value. This blows up the function. To get around this, test for an error first:
Function IFZERO(number, new_value)
If IsError(number) Then
IFZERO = new_value
ElseIf number = 0 Then
IFZERO = new_value
Else
IFZERO = number
End If
End Function