Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default When dividing by 0 can i show a result of 0 instead of #DIV/0

I have a formula that divides the quantity in one cell by the quantity in
another cell to give me a result in a third cell. It's designed to give me
labor rates. The problem is if I have a particular item I don't need the rate
for it I type in 0. That give's me a#DIV/0 result. Is there a condition I can
use if my labor rate is 0 to return 0 as the result. The #div/0 screws up all
the other quantities I need.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default When dividing by 0 can i show a result of 0 instead of #DIV/0

hi
use the iserror to test of the error.
=IF(ISERROR(B3/C3),0,B3/C3)

adjust the cell reference to suit your data.

Regards
FSt1

"daviddm" wrote:

I have a formula that divides the quantity in one cell by the quantity in
another cell to give me a result in a third cell. It's designed to give me
labor rates. The problem is if I have a particular item I don't need the rate
for it I type in 0. That give's me a#DIV/0 result. Is there a condition I can
use if my labor rate is 0 to return 0 as the result. The #div/0 screws up all
the other quantities I need.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default When dividing by 0 can i show a result of 0 instead of #DIV/0

Hi

You can replace the error like this, where A1/A2 is substituted with your
formula:

=IF(ISERROR(A1/A2);0;A1/A2)

regards,
Per

"daviddm" skrev i meddelelsen
...
I have a formula that divides the quantity in one cell by the quantity in
another cell to give me a result in a third cell. It's designed to give me
labor rates. The problem is if I have a particular item I don't need the
rate
for it I type in 0. That give's me a#DIV/0 result. Is there a condition I
can
use if my labor rate is 0 to return 0 as the result. The #div/0 screws up
all
the other quantities I need.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default When dividing by 0 can i show a result of 0 instead of #DIV/0

another way
=if(C3=0,0,B3/C3)

either way works

regards
FSt1

"FSt1" wrote:

hi
use the iserror to test of the error.
=IF(ISERROR(B3/C3),0,B3/C3)

adjust the cell reference to suit your data.

Regards
FSt1

"daviddm" wrote:

I have a formula that divides the quantity in one cell by the quantity in
another cell to give me a result in a third cell. It's designed to give me
labor rates. The problem is if I have a particular item I don't need the rate
for it I type in 0. That give's me a#DIV/0 result. Is there a condition I can
use if my labor rate is 0 to return 0 as the result. The #div/0 screws up all
the other quantities I need.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 293
Default When dividing by 0 can i show a result of 0 instead of #DIV/0

Hi daviddm,

Any number divided by 0 is infinite. Basic math. If you don't want a #DIV/0 result for some items, then don't divide them by 0.

If you need flexibility, you could use a formula like:
=IF(B1=0,A1,A1/B1)
where the divisor is in B1.

--
Cheers
macropod
[Microsoft MVP - Word]


"daviddm" wrote in message ...
I have a formula that divides the quantity in one cell by the quantity in
another cell to give me a result in a third cell. It's designed to give me
labor rates. The problem is if I have a particular item I don't need the rate
for it I type in 0. That give's me a#DIV/0 result. Is there a condition I can
use if my labor rate is 0 to return 0 as the result. The #div/0 screws up all
the other quantities I need.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default When dividing by 0 can i show a result of 0 instead of #DIV/0

IMO that is a very poor use of iserror. While it will catch Divide by Zero it
will also catch #ref and a whole pile of others. That means that if your
spreadsheet references become invalid becuase of deleted rows, columns or
such then your formula will return 0. The correct result is not zero but
rather it is invalid and should show #ref so that you know that their is a
problem and the results are not reliable. In this case if you delete column C
your formula will return zero when in fact the value is not known as the
entire formula is now invalid.

IMO a better options is to check the value of the denominator and if that is
zero then return zero...

=IF(C3=0,0,B3/C3)
--
HTH...

Jim Thomlinson


"FSt1" wrote:

hi
use the iserror to test of the error.
=IF(ISERROR(B3/C3),0,B3/C3)

adjust the cell reference to suit your data.

Regards
FSt1

"daviddm" wrote:

I have a formula that divides the quantity in one cell by the quantity in
another cell to give me a result in a third cell. It's designed to give me
labor rates. The problem is if I have a particular item I don't need the rate
for it I type in 0. That give's me a#DIV/0 result. Is there a condition I can
use if my labor rate is 0 to return 0 as the result. The #div/0 screws up all
the other quantities I need.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default When dividing by 0 can i show a result of 0 instead of #DIV/0

=IF(C3,B3/C3,)


"daviddm" wrote:

I have a formula that divides the quantity in one cell by the quantity in
another cell to give me a result in a third cell. It's designed to give me
labor rates. The problem is if I have a particular item I don't need the rate
for it I type in 0. That give's me a#DIV/0 result. Is there a condition I can
use if my labor rate is 0 to return 0 as the result. The #div/0 screws up all
the other quantities I need.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 690
Default When dividing by 0 can i show a result of 0 instead of #DIV/0

if my labor rate is 0 to return 0 as the result.

Just to add another option (Excel 2007)

=IFERROR(A1/B1, 0)

= = = = = = =
Dana DeLouis

On 12/23/2009 4:10 PM, daviddm wrote:
I have a formula that divides the quantity in one cell by the quantity in
another cell to give me a result in a third cell. It's designed to give me
labor rates. The problem is if I have a particular item I don't need the rate
for it I type in 0. That give's me a#DIV/0 result. Is there a condition I can
use if my labor rate is 0 to return 0 as the result. The #div/0 screws up all
the other quantities I need.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show two students have same result? DAVID Yii Excel Worksheet Functions 6 November 19th 08 12:21 PM
Wrong result on dividing 2 values Kyle Excel Worksheet Functions 1 February 8th 07 09:58 AM
Formulas never show result??? steph44haf Excel Discussion (Misc queries) 1 December 12th 06 08:45 PM
show result in msg box Jared Excel Discussion (Misc queries) 4 October 8th 06 09:03 PM
Advanced formula - Return result & Show Cell Reference of result Irv Excel Worksheet Functions 7 May 6th 06 03:36 AM


All times are GMT +1. The time now is 11:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"