Formula in Access Report to eliminate #DIV/0!

  • Thread starter Thread starter cjborntorun
  • Start date Start date
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
 
Use IIf() to handle the case where the divisor is zero:

=IIf([SumOfRL_LY4Wks$] = 0, Null,
[SumOfRL_Diff4Wk$] / [SumOfRL_LY4Wks$])
 
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?
 
Back
Top