Re: Divide By Zero
- From: "John Spencer" <spencer@xxxxxxxxx>
- Date: Mon, 6 Mar 2006 12:51:29 -0500
To return Null
Average = IIF(SumB>0,SumA/SumB, Null)
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:urqpE4TQGHA.4680@xxxxxxxxxxxxxxxxxxxxxxx
Paul W Smith wrote:
I am trying to set a calculated field which works out an average. MyUse "immediate if" - iif()
problem is that sometimes the denominator is zero causing an issue.
If this is the case I would like to return a null or blank.
SumA/SumB = Average
How do I wrap my calculating code so I get my desired results?
Average = iif(SumB>0,SumA/SumB, 999999999 )
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- Follow-Ups:
- Re: Divide By Zero
- From: Bob Barrows [MVP]
- Re: Divide By Zero
- References:
- Divide By Zero
- From: Paul W Smith
- Re: Divide By Zero
- From: Bob Barrows [MVP]
- Divide By Zero
- Prev by Date: Re: Adding a comma after Last Name
- Next by Date: Re: Show last records by date?
- Previous by thread: Re: Divide By Zero
- Next by thread: Re: Divide By Zero
- Index(es):