Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default display 0 instead of #DIV/0!

I've a data gathering and calculation summary sheet in a workbook, the other
sheets provide raw imput data.

The formula =SUM((B5+C5+E5+F5)*(200000/M5)) in N5 displays error #DIV/0!
because M5 has a 0 valve (no problem if M5 is 1 or ). I believe IF will
correct and display 0, but forget string. I left reference docs in home
country.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default display 0 instead of #DIV/0!

Try: =IF(M50,SUM(B5,C5,E5:F5)*(200000/M5),0)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Chris in BKK" wrote:
I've a data gathering and calculation summary sheet in a workbook, the other
sheets provide raw imput data.

The formula =SUM((B5+C5+E5+F5)*(200000/M5)) in N5 displays error #DIV/0!
because M5 has a 0 valve (no problem if M5 is 1 or ). I believe IF will
correct and display 0, but forget string. I left reference docs in home
country.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default display 0 instead of #DIV/0!

Thanks guys, I got it to work by using
=IF(M5="0",0,N5)+((B5+C5+E5+F5)*(200000/M5)), but I like the simpler one.

"T. Valko" wrote:

Try this:

=IF(M5=0,0,(B5+C5+E5+F5)*(200000/M5))

--
Biff
Microsoft Excel MVP


"Chris in BKK" <Chris in wrote in message
...
I've a data gathering and calculation summary sheet in a workbook, the
other
sheets provide raw imput data.

The formula =SUM((B5+C5+E5+F5)*(200000/M5)) in N5 displays error #DIV/0!
because M5 has a 0 valve (no problem if M5 is 1 or ). I believe IF will
correct and display 0, but forget string. I left reference docs in home
country.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default display 0 instead of #DIV/0!

Max
Your's gave a value of "true", need 0. The others worked.
thanks for your help
Chris

"Max" wrote:

Try: =IF(M50,SUM(B5,C5,E5:F5)*(200000/M5),0)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Chris in BKK" wrote:
I've a data gathering and calculation summary sheet in a workbook, the other
sheets provide raw imput data.

The formula =SUM((B5+C5+E5+F5)*(200000/M5)) in N5 displays error #DIV/0!
because M5 has a 0 valve (no problem if M5 is 1 or ). I believe IF will
correct and display 0, but forget string. I left reference docs in home
country.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default display 0 instead of #DIV/0!

Your's gave a value of "true", need 0. The others worked.

Aha, but that shouldn't be. Mine should have worked just as well, if not
better <g. I've just quite exhaustively tested all 3* suggestions here
against a plethora of possible inputs in the precedents (I took your posted
spec that M5 wouldn't be negative). All 3 evaluated to give the same answers,
except for the instance below.
*actually only 2, since Biff's and Peo's are identical

My suggestion to use SUM actually gives you a slight "edge" in that should
there inadvertently be any text input creeping into either B5,C5,E5 or F5,
SUM will ignore it and the formula will still evaluate a meaningful result,
instead of throwing a #VALUE! out due to the (B5+C5+E5+F5) part.

Anyway, pl tell me what are your values in B5,C5,E5,F5,M5 which gives the
return of TRUE instead of 0 ? I couldn't replicate it here.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default display 0 instead of #DIV/0!

I'm fascinated that you say you got it to work. I'm assuming that you've
put your formula in N5, and if so you've created a circular reference, which
has its own problems. You are testing for a text value of zero in M5, not
for a number zero.
--
David Biddulph

"Chris in BKK" wrote in message
...
Thanks guys, I got it to work by using
=IF(M5="0",0,N5)+((B5+C5+E5+F5)*(200000/M5)), but I like the simpler one.


"T. Valko" wrote:

Try this:

=IF(M5=0,0,(B5+C5+E5+F5)*(200000/M5))


"Chris in BKK" <Chris in wrote in message
...
I've a data gathering and calculation summary sheet in a workbook, the
other
sheets provide raw imput data.

The formula =SUM((B5+C5+E5+F5)*(200000/M5)) in N5 displays error
#DIV/0!
because M5 has a 0 valve (no problem if M5 is 1 or ). I believe IF
will
correct and display 0, but forget string. I left reference docs in home
country.






  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default display 0 instead of #DIV/0!

OTOH by keeping the operator Biff and I will know if there is a text in the
cells which might throw off the result otherwise :)

Peo


"Max" wrote in message
...
Your's gave a value of "true", need 0. The others worked.


Aha, but that shouldn't be. Mine should have worked just as well, if not
better <g. I've just quite exhaustively tested all 3* suggestions here
against a plethora of possible inputs in the precedents (I took your
posted
spec that M5 wouldn't be negative). All 3 evaluated to give the same
answers,
except for the instance below.
*actually only 2, since Biff's and Peo's are identical

My suggestion to use SUM actually gives you a slight "edge" in that should
there inadvertently be any text input creeping into either B5,C5,E5 or F5,
SUM will ignore it and the formula will still evaluate a meaningful
result,
instead of throwing a #VALUE! out due to the (B5+C5+E5+F5) part.

Anyway, pl tell me what are your values in B5,C5,E5,F5,M5 which gives the
return of TRUE instead of 0 ? I couldn't replicate it here.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default display 0 instead of #DIV/0!

ah, but of course <g
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


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 display remaining txt file which overflowed MsgBox display? EagleOne Excel Discussion (Misc queries) 1 November 2nd 06 01:10 PM
Display every 3rd category name but still display latest month maryj Charts and Charting in Excel 1 September 24th 06 09:05 PM
Can I display an Excel chart as my screensaver display? Burke Charts and Charting in Excel 0 August 1st 06 07:01 PM
how to display numbers in thousands i.e display 10,000 as 10 excel2002 Excel Worksheet Functions 4 April 26th 06 07:53 PM
Numbers display as decimal, i.e. enter 123 display 1.23 IGH219 Setting up and Configuration of Excel 1 June 16th 05 09:16 PM


All times are GMT +1. The time now is 01:32 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"