A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#Div/0



 
 
Thread Tools Display Modes
  #1  
Old July 21st, 2009, 06:49 PM posted to microsoft.public.excel.newusers
H
external usenet poster
 
Posts: 66
Default #Div/0

Hi - is there a way to avoid getting this result #DIV/0? Can I divide and get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you
  #2  
Old July 21st, 2009, 06:51 PM posted to microsoft.public.excel.newusers
Niek Otten
external usenet poster
 
Posts: 2,533
Default #Div/0

=IF(A5=0,"",B5/A5)

"H" wrote in message
...
Hi - is there a way to avoid getting this result #DIV/0? Can I divide and
get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you


  #3  
Old July 21st, 2009, 06:56 PM posted to microsoft.public.excel.newusers
eduardo
external usenet poster
 
Posts: 2,131
Default #Div/0

Hi
=if(a5="","",B5/A5)

"H" wrote:

Hi - is there a way to avoid getting this result #DIV/0? Can I divide and get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you

  #4  
Old July 21st, 2009, 10:06 PM posted to microsoft.public.excel.newusers
JLatham
external usenet poster
 
Posts: 1,896
Default #Div/0

Here's one that's even more generic, but a little more dangerous - it
disregards virtually all errors, including divide by zero:
=IF(ISERR(B5/A5),"",B5/A5)
note that you can put something in there to show when it did have a problem
(most likely a divide by zero:
=IF(ISERR(B5/A5),"---",B5/A5)


"H" wrote:

Hi - is there a way to avoid getting this result #DIV/0? Can I divide and get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you

  #5  
Old July 22nd, 2009, 04:43 PM posted to microsoft.public.excel.newusers
H
external usenet poster
 
Posts: 66
Default #Div/0

Hey thanks -- is there a way to do something like this for - I'm getting the
#Div/0 on a few cuz T is 0
=+(X2/T2)*12

"JLatham" wrote:

Here's one that's even more generic, but a little more dangerous - it
disregards virtually all errors, including divide by zero:
=IF(ISERR(B5/A5),"",B5/A5)
note that you can put something in there to show when it did have a problem
(most likely a divide by zero:
=IF(ISERR(B5/A5),"---",B5/A5)


"H" wrote:

Hi - is there a way to avoid getting this result #DIV/0? Can I divide and get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you

  #6  
Old July 22nd, 2009, 06:20 PM posted to microsoft.public.excel.newusers
joeu2004
external usenet poster
 
Posts: 1,748
Default #Div/0

"H" wrote:
is there a way to do something like this for - I'm getting the
#Div/0 on a few cuz T is 0
=+(X2/T2)*12


=if(T2=0, "", 12*X2/T2)

That results in a cell that appears blank if T2 is zero. Alternatively,
replace "" with anything else you wish, for example 0.

  #7  
Old July 22nd, 2009, 08:58 PM posted to microsoft.public.excel.newusers
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default #Div/0

Hi,

I second Bob's comment on your other post - please post a question to only
one newgroup at a time.

You have plenty of answers between your two post, but let me encourage you
not to use the
=+(X2/T2)*12 syntax

First you don't need both = and + and in fact you should use only = to start
your formulas. =- is OK but not =+ It doesn't affect the formula results
but it is extra typing, takes extra memory, and is bad style.

Second =X2/T2*12 does the same calculation as your. So the parentheses are
not necessary here.


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"H" wrote:

Hey thanks -- is there a way to do something like this for - I'm getting the
#Div/0 on a few cuz T is 0
=+(X2/T2)*12

"JLatham" wrote:

Here's one that's even more generic, but a little more dangerous - it
disregards virtually all errors, including divide by zero:
=IF(ISERR(B5/A5),"",B5/A5)
note that you can put something in there to show when it did have a problem
(most likely a divide by zero:
=IF(ISERR(B5/A5),"---",B5/A5)


"H" wrote:

Hi - is there a way to avoid getting this result #DIV/0? Can I divide and get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you

  #8  
Old July 22nd, 2009, 11:51 PM posted to microsoft.public.excel.newusers
joeu2004
external usenet poster
 
Posts: 1,748
Default #Div/0

"Shane Devenshire" wrote:
Second =X2/T2*12 does the same calculation as your.
So the parentheses are not necessary here.


Well, if we're nitpicking style....

I wholly agree with deprecating unneeded parentheses when they encumber
readability.

But I would say that 12*X2/T2 is better than X2/T2*12 in most contexts.

Even though they are functionally equivalent, thanks to the equal precedence
of / and *, I would say that X2/T2*12 is easy to misinterpret, and it is
easy to raise questions about the intent ( X2/(T2*12)? ).

If I were to express X2/T2*12 in that order, I would either write X2/T2 * 12
(added spacing) or, in fact, (X2/T2)*12.


----- original message -----

"Shane Devenshire" wrote in
message ...
Hi,

I second Bob's comment on your other post - please post a question to only
one newgroup at a time.

You have plenty of answers between your two post, but let me encourage you
not to use the
=+(X2/T2)*12 syntax

First you don't need both = and + and in fact you should use only = to
start
your formulas. =- is OK but not =+ It doesn't affect the formula results
but it is extra typing, takes extra memory, and is bad style.

Second =X2/T2*12 does the same calculation as your. So the parentheses
are
not necessary here.


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"H" wrote:

Hey thanks -- is there a way to do something like this for - I'm getting
the
#Div/0 on a few cuz T is 0
=+(X2/T2)*12

"JLatham" wrote:

Here's one that's even more generic, but a little more dangerous - it
disregards virtually all errors, including divide by zero:
=IF(ISERR(B5/A5),"",B5/A5)
note that you can put something in there to show when it did have a
problem
(most likely a divide by zero:
=IF(ISERR(B5/A5),"---",B5/A5)


"H" wrote:

Hi - is there a way to avoid getting this result #DIV/0? Can I divide
and get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you


  #9  
Old July 30th, 2009, 11:23 PM posted to microsoft.public.excel.newusers
H
external usenet poster
 
Posts: 66
Default #Div/0

what about this when one of the columns has #div/0
=+((X807/T807)*12)/V807

"JoeU2004" wrote:

"Shane Devenshire" wrote:
Second =X2/T2*12 does the same calculation as your.
So the parentheses are not necessary here.


Well, if we're nitpicking style....

I wholly agree with deprecating unneeded parentheses when they encumber
readability.

But I would say that 12*X2/T2 is better than X2/T2*12 in most contexts.

Even though they are functionally equivalent, thanks to the equal precedence
of / and *, I would say that X2/T2*12 is easy to misinterpret, and it is
easy to raise questions about the intent ( X2/(T2*12)? ).

If I were to express X2/T2*12 in that order, I would either write X2/T2 * 12
(added spacing) or, in fact, (X2/T2)*12.


----- original message -----

"Shane Devenshire" wrote in
message ...
Hi,

I second Bob's comment on your other post - please post a question to only
one newgroup at a time.

You have plenty of answers between your two post, but let me encourage you
not to use the
=+(X2/T2)*12 syntax

First you don't need both = and + and in fact you should use only = to
start
your formulas. =- is OK but not =+ It doesn't affect the formula results
but it is extra typing, takes extra memory, and is bad style.

Second =X2/T2*12 does the same calculation as your. So the parentheses
are
not necessary here.


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"H" wrote:

Hey thanks -- is there a way to do something like this for - I'm getting
the
#Div/0 on a few cuz T is 0
=+(X2/T2)*12

"JLatham" wrote:

Here's one that's even more generic, but a little more dangerous - it
disregards virtually all errors, including divide by zero:
=IF(ISERR(B5/A5),"",B5/A5)
note that you can put something in there to show when it did have a
problem
(most likely a divide by zero:
=IF(ISERR(B5/A5),"---",B5/A5)


"H" wrote:

Hi - is there a way to avoid getting this result #DIV/0? Can I divide
and get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you



  #10  
Old July 31st, 2009, 01:02 AM posted to microsoft.public.excel.newusers
joeu2004
external usenet poster
 
Posts: 1,748
Default #Div/0

"H" wrote:
what about this when one of the columns has #div/0
=+((X807/T807)*12)/V807


Use JLatham's generic solution (well, almost), namely:

=if(iserror(12*X807/T807/V807), 0, 12*X807/T807/V807)

or

=if(iserror(12*X807/T807/V807), "", 12*X807/T807/V807)

See the help page for Is Functions for the difference between ISERR and
ISERROR. It's a judgment call.

Caveat emptor: If you start returning "" in some cells, it would be prudent
to allow for references to such cells in your formulas. So:

=if(iserror(12*n(X807)/n(T807)/n(V807)), "", 12*n(X807)/n(T807)/n(V807))


----- original message -----

"H" wrote in message
...
what about this when one of the columns has #div/0
=+((X807/T807)*12)/V807

[.....]
"JLatham" wrote:

Here's one that's even more generic, but a little more dangerous -
it
disregards virtually all errors, including divide by zero:
=IF(ISERR(B5/A5),"",B5/A5)
note that you can put something in there to show when it did have a
problem
(most likely a divide by zero:
=IF(ISERR(B5/A5),"---",B5/A5)


"H" wrote:

Hi - is there a way to avoid getting this result #DIV/0? Can I
divide
and get
a line or something instead when there is nothing to divide by?

=B5/A5?

Thank you


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:14 PM.


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