Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#NUM! 1

Status
Not open for further replies.

cc143most

Technical User
Jun 1, 2009
12
US
I am dividing in my report and getting #NUM! results that I want to get rid of. I originally used the "Nz" statement to give me a 0% result where appropriate. Then, I found DHookum's advice to someone to use the following:

=IIf([Pot]=0," ",[Obtained]/[Pot])

Now, when I have 1 potential and 0 obtained, my field is blank instead of 0%. Can someone give me the right code for fixing both issues?

Thank you!
 
I can't quite see how this is true:

"Now, when I have 1 potential and 0 obtained"

That would give you:

IIf([Pot]=0," ",0/1)

And 0/1=0 yesno?

 
It was still blank if the percentage was 0. I had it give me "NA" if no potentials so that I could see exactly what was working and what wasn't. I ended up having to write it like this:

=IIf([Pot]=0,"NA",Nz([Obtained],0)/[Pot])

This gives me "NA" if there are no potentials and 0% if there are none obtained.

Thanks again for your help, Duane! It's been a tough road, but I'm almost ready for the presentation this week!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top