473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

#Num!

46
One of my text fields in a report is:
=Sum([ConfAttendance])/Sum([ConfOffrate])

But how do I use the IIF statement on it to prevent the #NUM! error when dividing by zero?


Thanks!
Mar 14 '08 #1
1 1856
Stewart Ross
2,545 Expert Mod 2GB
Hi. Use of IIF to do this is
Expand|Select|Wrap|Line Numbers
  1. =IIF(Sum([ConfOffrate])=0, Null, Sum([ConfAttendance])/Sum([ConfOffrate]))
I have placed Null as the return value, as it would be inappropriate to return a value in such circumstances. Theoretically the result of division by zero is infinity. If you need to return a value for any reason change Null to 0, but understand that it is not representing the result of the division itself.

-Stewart
Mar 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Francis Bell | last post by:
Hello, I've got a program that is reading in a data file of 25 lines. Here is an example of the first two lines: sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1 f/floating minnow/AAA...
4
by: Kerry | last post by:
Let's say I have float num = 1.1 and have float increment = 0.1 , num +=increment doesn't compute exactly to 1.2 ... is there a way to make it equal exactly to 1.2?
1
by: franknavec | last post by:
I have created a database in MS Access 2000. I want to compute for percent defective and in the control source I have this expression: =((/)*100). Its OK if I have the numbers greater than zero....
1
by: charlies224 | last post by:
Hi, I am writting a software that requires me to make sure the Num Lock is always on and Caps Lock is always off. First, I know how to detect if Num Lock or Caps Lock is on or off (if...
1
by: Paul Nathan | last post by:
Further to my post about keyboard problems, I have discovered that Num Lock seems to change the e.keycode for the arrow keys and the 9 above them excluding scroll lock and pause-break. With Num...
1
by: mazdotnet | last post by:
Hi, In excel there is a function MROUND(num, multiple) - The num argument is the number you want to round, while multiple is the value you want used in the rounding. Is there a function in C#...
35
by: fermineutron | last post by:
For a while now i have been "playing" with a little C program to compute the factorial of large numbers. Currently it takes aboy 1 second per 1000 multiplications, that is 25000P1000 will take...
5
by: ielamrani | last post by:
Hi all, I Linked an excel sheet to a database but I am experiencing the following the issue: Excel Sheet Database table Plan ID Plan Name ...
0
by: Sam Durai | last post by:
I have a 4-processor unix machine running DB2 9. After install on I activated the license using db2licm -a db2ese_c.lic. And I tried to change CPU num using db2licm -n db2ese 4, but it failed as...
7
by: southernsunsations | last post by:
/******************************************************************\ * * * * Date: 09.06.2007 ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.