#1   Report Post  
Posted to microsoft.public.excel.misc
kevcar40
 
Posts: n/a
Default divivde by zero

hi
i have the following formula that reurns the efficiency of a team
this works great until a zero score is entered and 60 minutes is
entered as a downtime


(C27/($C$147*(C142-C25)/C142)

the cells are as follows
c27 = 0 score
C147 = 78 target
C142 = 60 minutes available
c25 = 60 downtime

How can i put a zero in to the result cell if the result is #div/0!

thanks for your help

kevin

  #2   Report Post  
Posted to microsoft.public.excel.misc
Paul B
 
Posts: n/a
Default divivde by zero

Kevin, here is one way,
=IF(ISERROR(C27/($C$147*(C142-C25)/C142)),0,C27/($C$147*(C142-C25)/C142))

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"kevcar40" wrote in message
oups.com...
hi
i have the following formula that reurns the efficiency of a team
this works great until a zero score is entered and 60 minutes is
entered as a downtime


(C27/($C$147*(C142-C25)/C142)

the cells are as follows
c27 = 0 score
C147 = 78 target
C142 = 60 minutes available
c25 = 60 downtime

How can i put a zero in to the result cell if the result is #div/0!

thanks for your help

kevin



  #3   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default divivde by zero

Alternatively:

IF(($C$147*(C142-C25)/C142)=0,0,C27/($C$147*(C142-C25)/C142))

Hope this helps.

Pete

  #4   Report Post  
Posted to microsoft.public.excel.misc
kevcar40
 
Posts: n/a
Default divivde by zero

Thanks both
both work the problem was not the formula but the fact i was trying
hide the cell value if the result was zero
as follows
=IF(C27/($C$147*((C142-C25)/C142))=0%,"",if(C27=0,0,(C27/($C$147*(C142-C25)/C142)))
when i remove the first aprt of th statement it works fine
as follows

=IF(C27=0,0,(C27/($C$147*(C142-C25)/C142)))
If i can hide the value so be it

thanks kevin

  #5   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default divivde by zero

Thanks for feeding back.

Pete



  #6   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default divivde by zero

Actually, if you want the zero to be hidden you can do this - use
Format | Conditional Formatting to select a foreground colour of white
if the cell content is equal to 0.

Pete

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



All times are GMT +1. The time now is 05:04 PM.

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

About Us

"It's about Microsoft Excel"