Numberic value is out of range - Excel

polgara

Registered User.
Local time
Today, 05:59
Joined
Feb 22, 2001
Messages
11
I have a query with lots of calculated fields that I want to pull into Excel for some managers to query.

I have no problems with this for other queries but this one just throws up 'Numerical Value if out of Range' now there are calculated fields that are showing #error due to 0/0 type calculations.

I'm stumped and would appreciate any advice?
 
And you're puzzled on what here ? 0/0?

0/0 is not defined...nor is there an answer..its refered to as indeterminate, mathematically speaking. You have 0 oranges, you cannot divide 0 oranges between 0 people. So the answer is indeterminate. Why would someone want to calculate this, is my question. If this happens then you need to consider this case and throw in some value in your excel sheet like 0.

Jon
 
You'll need to change your query if your divisor may contain zero.

Select IIf(Nz(YourDivisor,0) = 0, 0, fldA/YourDivisor) As Quotient, ....

or

Select IIf(Nz(YourDivisor,0) = 0, null, fldA/YourDivisor) As Quotient, ....

You need to decide if you want the result to be 0 or null
 
Thanks Pat I'll try that

FYI mission2java_78 I'm not trying to do a 0/0 its just that sometimes these figures crop up
 

Users who are viewing this thread

Back
Top Bottom