Public Function NullToZero(TheValue As Variant)
'This function converts Null to Zero It also converts Non Existing Data to Zero
On Error GoTo NullToZero_Err
If IsNull(TheValue) Then
NullToZero = 0
Else
NullToZero = TheValue
End If
Exit Function
NullToZero_Err:
'This function would only generate an error if the data in TheValue doesn't exist at all.
NullToZero = 0
Exit Function
End Function
Nadam se da će ovo nekome biti korisno.
PS
Da ne ispadne da se hvalim da sam autor, funkciju sam nasao na internetu.
Hear all, trust nothing!