Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Formula function for ignoring cells/results equal to 0 (zero) ?

Assume I want to setup a formula for a cell which should calculate the result from several other cells
similar to

C1=K5/k6 + U8/U9 + M12/M13

As you can see if the value of the cells K6 or U9 or M13 are zero there is a division by zero
and the calculation crashes. In this case the terms should be ignored.

What I need now is a precalculation-and-ignore-instruction which excludes the terms similar to

C1=ignoreiftrue(K6=0,K5/k6) + ignoreiftrue(U9=0,U8/U9) + ignoreiftrue(M13=0,M12/M13)

In more general form the function

ignoreiftrue(<condition,<expression)

should evaluate at first the condition and if it is NOT true uses the expression(=function) as usual.

Is there such a function in Excel?

Keith

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default Formula function for ignoring cells/results equal to 0 (zero) ?

Since you are doing addition, zeroes won't affect the total, so you could do
this...

=IF(K6=0,0,K5/K6)+IF(U9=0,0,U8/U9)+IF(M13=0,0,M12/M13)

--
Rick (MVP - Excel)


"Keith Clark" wrote in message
...
Assume I want to setup a formula for a cell which should calculate the
result from several other cells
similar to

C1=K5/k6 + U8/U9 + M12/M13

As you can see if the value of the cells K6 or U9 or M13 are zero there is
a division by zero
and the calculation crashes. In this case the terms should be ignored.

What I need now is a precalculation-and-ignore-instruction which excludes
the terms similar to

C1=ignoreiftrue(K6=0,K5/k6) + ignoreiftrue(U9=0,U8/U9) +
ignoreiftrue(M13=0,M12/M13)

In more general form the function

ignoreiftrue(<condition,<expression)

should evaluate at first the condition and if it is NOT true uses the
expression(=function) as usual.

Is there such a function in Excel?

Keith


  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Formula function for ignoring cells/results equal to 0 (zero) ?

=IF(ISERROR(K5/K6),0,K5/K6) + .... + ...

If this post helps click Yes
---------------
Jacob Skaria


"Keith Clark" wrote:

Assume I want to setup a formula for a cell which should calculate the result from several other cells
similar to

C1=K5/k6 + U8/U9 + M12/M13

As you can see if the value of the cells K6 or U9 or M13 are zero there is a division by zero
and the calculation crashes. In this case the terms should be ignored.

What I need now is a precalculation-and-ignore-instruction which excludes the terms similar to

C1=ignoreiftrue(K6=0,K5/k6) + ignoreiftrue(U9=0,U8/U9) + ignoreiftrue(M13=0,M12/M13)

In more general form the function

ignoreiftrue(<condition,<expression)

should evaluate at first the condition and if it is NOT true uses the expression(=function) as usual.

Is there such a function in Excel?

Keith


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
Ignoring formula results of #N/A Capt. Bangs Excel Worksheet Functions 1 March 21st 09 09:06 PM
Ignoring formula results of #N/A francis Excel Worksheet Functions 2 February 28th 09 04:08 AM
Excel - Min function over 4 separate cells, but ignoring negatives griff Excel Worksheet Functions 8 July 10th 08 10:34 AM
Conditional Sum Argument results do not equal cell results Excel Randy R Mullins Excel Worksheet Functions 3 August 9th 06 07:16 PM
Chart ignoring formulas but only plotting formula results JD Charts and Charting in Excel 1 February 3rd 06 07:29 PM


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