# Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I cannot find the post on converting # error to zero.

In a query, my field is:

% staff processed: (nz([staff],0))/(nz([client],0))

if the client value is zero, the returned value is # error.

Is there a way to make it show either 0 or n/a?

thanks
 
% staff processed: iif(nz([client],0) =0, 0, nz([staff],0) / nz([client],0))
 
You need to test for Zero or null and handle that. Something like the
following.

% staff processed: IIF(NZ(Client,0)=0, 0,NZ(Staff,0)/Client))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Division by Zero Error 1
Access #Error & Excel Pivot 0
Dividing by zero in a calculated field of a query 4
QRY FORMULA ISSUE 4
Average Null Values 3
NZ function 1
Nz or Iif 8
Nz function 0

Back
Top