the answer is probably
=IIF(Nz(Sum([5_2_1e_i]);0)=0;0;Round(Sum([5_2_1e_ii])/Sum([5_2_1e_i])*100,2))
I use a SafeDiv Function myself:
Public Function SaveDiv(ByVal T As Variant, ByVal N As Variant) AS Double
On Error Resume Next
N= Nz(N,0)
If N=0 Then Exit Function
T=Nz(T,0)
SaveDiv = T/N
End Function
HTH
Pieter
Wayne-I-M said:
Hi Pritesh
I Take it that [5_2_1e_ii]) ([5_2_1e_i]) are number fields that may or may
not contain data (a number). if so then use
=Round(Sum(Nz([5_2_1e_ii]))/Sum(Nz([5_2_1e_i]))*100,2)
For more info go to help and search on Null=Zero or Nz
Hope this helps
--
Wayne
Manchester, England.
:
In the expression builder, Im calculating a %.
=Round(Sum([5_2_1e_ii])/Sum([5_2_1e_i])*100,2)
but when i get Null values, the output is #NUM, I need it to be zero.
How do i do this?
--
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4182 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here:
http://www.spamfighter.com/len