#NUM! error

T

taylor.gaffney

I am creating a report where we are trying to figure out our total
referrals by our bound referrals and the percents of bound referrals to
the total. I am getting a #Num! error in my percentage field because I
am diving 0 into 0 in the fouth quater...I thought the NZ would
eliminate this error...

Below is the code I have in there now, any recommendations?


=(nz([Q1Bound])+nz([Q2Bound])+nz([Q3Bound])+nz([Q4Bound]))/(nz([Q1Total])+nz([Q2Total])+nz([Q3Total])+nz([Q4Total]))
 
D

Duane Hookom

You need to use this basic syntax:

=IIf(Nz([some expression],0) = 0, 0, [Other Expression]/[some expression])
 
T

taylor.gaffney

Doesn't this make sense....

I am fairly new at VB...


Duane said:
You need to use this basic syntax:

=IIf(Nz([some expression],0) = 0, 0, [Other Expression]/[some expression])

--
Duane Hookom
MS Access MVP

I am creating a report where we are trying to figure out our total
referrals by our bound referrals and the percents of bound referrals to
the total. I am getting a #Num! error in my percentage field because I
am diving 0 into 0 in the fouth quater...I thought the NZ would
eliminate this error...

Below is the code I have in there now, any recommendations?


=(nz([Q1Bound])+nz([Q2Bound])+nz([Q3Bound])+nz([Q4Bound]))/(nz([Q1Total])+nz([Q2Total])+nz([Q3Total])+nz([Q4Total]))
 
D

Duane Hookom

Did you mean "this doesn't make sense"? If so, what don't you understand? Do
you have trouble seeing how to implement the IIf() with your expression?


--
Duane Hookom
MS Access MVP


Doesn't this make sense....

I am fairly new at VB...


Duane said:
You need to use this basic syntax:

=IIf(Nz([some expression],0) = 0, 0, [Other Expression]/[some
expression])

--
Duane Hookom
MS Access MVP

I am creating a report where we are trying to figure out our total
referrals by our bound referrals and the percents of bound referrals to
the total. I am getting a #Num! error in my percentage field because I
am diving 0 into 0 in the fouth quater...I thought the NZ would
eliminate this error...

Below is the code I have in there now, any recommendations?


=(nz([Q1Bound])+nz([Q2Bound])+nz([Q3Bound])+nz([Q4Bound]))/(nz([Q1Total])+nz([Q2Total])+nz([Q3Total])+nz([Q4Total]))
 
T

taylor.gaffney

I am sorry, yeah I meant doesnt make sense.... I was going to attempt
to create my expression, but it just doesnt make sense....I would I
create or start it...


Duane said:
Did you mean "this doesn't make sense"? If so, what don't you understand? Do
you have trouble seeing how to implement the IIf() with your expression?


--
Duane Hookom
MS Access MVP


Doesn't this make sense....

I am fairly new at VB...


Duane said:
You need to use this basic syntax:

=IIf(Nz([some expression],0) = 0, 0, [Other Expression]/[some
expression])

--
Duane Hookom
MS Access MVP

I am creating a report where we are trying to figure out our total
referrals by our bound referrals and the percents of bound referrals to
the total. I am getting a #Num! error in my percentage field because I
am diving 0 into 0 in the fouth quater...I thought the NZ would
eliminate this error...

Below is the code I have in there now, any recommendations?


=(nz([Q1Bound])+nz([Q2Bound])+nz([Q3Bound])+nz([Q4Bound]))/(nz([Q1Total])+nz([Q2Total])+nz([Q3Total])+nz([Q4Total]))
 
D

Duane Hookom

Try this expression:
=IIf(nz([Q1Total],0)+nz([Q2Total],0)+nz([Q3Total],0)+nz([Q4Total],0) = 0, 0,
(nz([Q1Bound],0)+nz([Q2Bound],0)+nz([Q3Bound],0)+nz([Q4Bound],0))/(nz([Q1Total],0)+nz([Q2Total],0)+nz([Q3Total],0)+nz([Q4Total],0)))


--
Duane Hookom
MS Access MVP

I am sorry, yeah I meant doesnt make sense.... I was going to attempt
to create my expression, but it just doesnt make sense....I would I
create or start it...


Duane said:
Did you mean "this doesn't make sense"? If so, what don't you understand?
Do
you have trouble seeing how to implement the IIf() with your expression?


--
Duane Hookom
MS Access MVP


Doesn't this make sense....

I am fairly new at VB...


Duane Hookom wrote:
You need to use this basic syntax:

=IIf(Nz([some expression],0) = 0, 0, [Other Expression]/[some
expression])

--
Duane Hookom
MS Access MVP

I am creating a report where we are trying to figure out our total
referrals by our bound referrals and the percents of bound referrals
to
the total. I am getting a #Num! error in my percentage field
because I
am diving 0 into 0 in the fouth quater...I thought the NZ would
eliminate this error...

Below is the code I have in there now, any recommendations?


=(nz([Q1Bound])+nz([Q2Bound])+nz([Q3Bound])+nz([Q4Bound]))/(nz([Q1Total])+nz([Q2Total])+nz([Q3Total])+nz([Q4Total]))
 
T

taylor.gaffney

It totally worked, thanks. I will keep this statement for my records
incase I run into this situation again.



Duane said:
Try this expression:
=IIf(nz([Q1Total],0)+nz([Q2Total],0)+nz([Q3Total],0)+nz([Q4Total],0) = 0, 0,
(nz([Q1Bound],0)+nz([Q2Bound],0)+nz([Q3Bound],0)+nz([Q4Bound],0))/(nz([Q1Total],0)+nz([Q2Total],0)+nz([Q3Total],0)+nz([Q4Total],0)))


--
Duane Hookom
MS Access MVP

I am sorry, yeah I meant doesnt make sense.... I was going to attempt
to create my expression, but it just doesnt make sense....I would I
create or start it...


Duane said:
Did you mean "this doesn't make sense"? If so, what don't you understand?
Do
you have trouble seeing how to implement the IIf() with your expression?


--
Duane Hookom
MS Access MVP


Doesn't this make sense....

I am fairly new at VB...


Duane Hookom wrote:
You need to use this basic syntax:

=IIf(Nz([some expression],0) = 0, 0, [Other Expression]/[some
expression])

--
Duane Hookom
MS Access MVP

I am creating a report where we are trying to figure out our total
referrals by our bound referrals and the percents of bound referrals
to
the total. I am getting a #Num! error in my percentage field
because I
am diving 0 into 0 in the fouth quater...I thought the NZ would
eliminate this error...

Below is the code I have in there now, any recommendations?


=(nz([Q1Bound])+nz([Q2Bound])+nz([Q3Bound])+nz([Q4Bound]))/(nz([Q1Total])+nz([Q2Total])+nz([Q3Total])+nz([Q4Total]))
 

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

#Num question 2
#Num! Error Box 1
#NUM! error 5
#Num! 3
#Error Message on Report 1
Summing Text fields using NZ function causing error 2
Error: Write conflict 1
#Error 1

Top