Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 12
Default formula for spreadsheet, avoiding zeros?

i have a row of formulas.
b11 through h11
b8/b9, c8/c9,d8/d9, so on and so forth.
how to i prevent the formula from reporting #DIV/0! when in column B there
isn't a number, or the number is 0.

In these cases I just want it to be either blank, or a 0, not this error.
I know you can't divide by zero, i just don't know how to tell the prog that
it doesn't have to, and to just ignore
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 12
Default formula for spreadsheet, avoiding zeros?

Hours 5
Tips 23
Odom1 98776
Odom2 99555
Miles odom2-odom1
Gallons 2.000
Gas $ 3.799
MPG #VALUE!

if I don't work on this day, the numbers are zero.
both gallons (B9) and miles(b8)
i guess what i need is an IF statement that is something like t his:
=IF(B8=0,0,B8/B9) OR IF(B9=0,0,B8/B9)
but that isn't correct.
i just need help with the format.
thanks :)

"spezticle" wrote:

i have a row of formulas.
b11 through h11
b8/b9, c8/c9,d8/d9, so on and so forth.
how to i prevent the formula from reporting #DIV/0! when in column B there
isn't a number, or the number is 0.

In these cases I just want it to be either blank, or a 0, not this error.
I know you can't divide by zero, i just don't know how to tell the prog that
it doesn't have to, and to just ignore

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,718
Default formula for spreadsheet, avoiding zeros?

=IF(B9,B8/B9,0)


"spezticle" wrote:

Hours 5
Tips 23
Odom1 98776
Odom2 99555
Miles odom2-odom1
Gallons 2.000
Gas $ 3.799
MPG #VALUE!

if I don't work on this day, the numbers are zero.
both gallons (B9) and miles(b8)
i guess what i need is an IF statement that is something like t his:
=IF(B8=0,0,B8/B9) OR IF(B9=0,0,B8/B9)
but that isn't correct.
i just need help with the format.
thanks :)

"spezticle" wrote:

i have a row of formulas.
b11 through h11
b8/b9, c8/c9,d8/d9, so on and so forth.
how to i prevent the formula from reporting #DIV/0! when in column B there
isn't a number, or the number is 0.

In these cases I just want it to be either blank, or a 0, not this error.
I know you can't divide by zero, i just don't know how to tell the prog that
it doesn't have to, and to just ignore

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 12
Default formula for spreadsheet, avoiding zeros?

thanks much!
works seemlessly :)

"Teethless mama" wrote:

=IF(B9,B8/B9,0)


"spezticle" wrote:

Hours 5
Tips 23
Odom1 98776
Odom2 99555
Miles odom2-odom1
Gallons 2.000
Gas $ 3.799
MPG #VALUE!

if I don't work on this day, the numbers are zero.
both gallons (B9) and miles(b8)
i guess what i need is an IF statement that is something like t his:
=IF(B8=0,0,B8/B9) OR IF(B9=0,0,B8/B9)
but that isn't correct.
i just need help with the format.
thanks :)

"spezticle" wrote:

i have a row of formulas.
b11 through h11
b8/b9, c8/c9,d8/d9, so on and so forth.
how to i prevent the formula from reporting #DIV/0! when in column B there
isn't a number, or the number is 0.

In these cases I just want it to be either blank, or a 0, not this error.
I know you can't divide by zero, i just don't know how to tell the prog that
it doesn't have to, and to just ignore

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default formula for spreadsheet, avoiding zeros?

=IF(B9=0,"",B8/B9) will do the trick in this case because it only matters
if B9 is empty or 0(same thing)

To check for both B8 and B9

=IF(AND(B8=0,B9=0),"",B8/B9)

To check either

=IF(OR(B8=0,B9=0),"",B8/B9)


Gord Dibben MS Excel MVP


On Thu, 18 Sep 2008 12:06:06 -0700, spezticle
wrote:

Hours 5
Tips 23
Odom1 98776
Odom2 99555
Miles odom2-odom1
Gallons 2.000
Gas $ 3.799
MPG #VALUE!

if I don't work on this day, the numbers are zero.
both gallons (B9) and miles(b8)
i guess what i need is an IF statement that is something like t his:
=IF(B8=0,0,B8/B9) OR IF(B9=0,0,B8/B9)
but that isn't correct.
i just need help with the format.
thanks :)

"spezticle" wrote:

i have a row of formulas.
b11 through h11
b8/b9, c8/c9,d8/d9, so on and so forth.
how to i prevent the formula from reporting #DIV/0! when in column B there
isn't a number, or the number is 0.

In these cases I just want it to be either blank, or a 0, not this error.
I know you can't divide by zero, i just don't know how to tell the prog that
it doesn't have to, and to just ignore




  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,718
Default formula for spreadsheet, avoiding zeros?

You're Welcome!

"spezticle" wrote:

thanks much!
works seemlessly :)

"Teethless mama" wrote:

=IF(B9,B8/B9,0)


"spezticle" wrote:

Hours 5
Tips 23
Odom1 98776
Odom2 99555
Miles odom2-odom1
Gallons 2.000
Gas $ 3.799
MPG #VALUE!

if I don't work on this day, the numbers are zero.
both gallons (B9) and miles(b8)
i guess what i need is an IF statement that is something like t his:
=IF(B8=0,0,B8/B9) OR IF(B9=0,0,B8/B9)
but that isn't correct.
i just need help with the format.
thanks :)

"spezticle" wrote:

i have a row of formulas.
b11 through h11
b8/b9, c8/c9,d8/d9, so on and so forth.
how to i prevent the formula from reporting #DIV/0! when in column B there
isn't a number, or the number is 0.

In these cases I just want it to be either blank, or a 0, not this error.
I know you can't divide by zero, i just don't know how to tell the prog that
it doesn't have to, and to just ignore

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
Formula for Avoiding totals of Duplicate Information Garbage Man Excel Discussion (Misc queries) 1 January 15th 08 03:16 PM
Avoiding Value error message due to space in cell w/ formula A.R. Hunt Excel Discussion (Misc queries) 3 January 26th 07 09:52 PM
What formula is used to replace blanks in spreadsheet with zeros? Jordan Excel Worksheet Functions 3 September 14th 06 11:18 PM
Avoiding typing similar formula 600 times Ian D. Weatherall Excel Worksheet Functions 5 June 29th 05 06:51 AM
Avoiding circular reference on formula Chuck W Excel Discussion (Misc queries) 4 February 22nd 05 02:52 AM


All times are GMT +1. The time now is 10:49 PM.

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"