Formula in Access Report to eliminate #DIV/0!

C

cjborntorun

I currently have this formula on my report to calculate a percentage:

=[SumOfRL_Diff4Wk$]/[SumOfRL_LY4Wks$]

For each result of "#DIV/0!", I want to see "NEW" instead. Can someone help
me with that formula?

Thank you
 
A

Allen Browne

Use IIf() to handle the case where the divisor is zero:

=IIf([SumOfRL_LY4Wks$] = 0, Null,
[SumOfRL_Diff4Wk$] / [SumOfRL_LY4Wks$])
 
C

cjborntorun

Thank you Allen Browne

Allen Browne said:
Use IIf() to handle the case where the divisor is zero:

=IIf([SumOfRL_LY4Wks$] = 0, Null,
[SumOfRL_Diff4Wk$] / [SumOfRL_LY4Wks$])

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

cjborntorun said:
I currently have this formula on my report to calculate a percentage:

=[SumOfRL_Diff4Wk$]/[SumOfRL_LY4Wks$]

For each result of "#DIV/0!", I want to see "NEW" instead.
Can someone help me with that formula?
 

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

Top