Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default How to ignore #DIV/0! in Sumproduct formula

"Peo Sjoblom" wrote...
If we assume that the div errors are caused by the second part of
your formula this might work

=SUM(IF(ISERROR((Main!I2:I95-Main!H2:H95)/(Main!I2:I95)0.5),0,
(Main!I2:I95-Main!H2:H95)/(Main!I2:I95)0.5)*(Main!H2:H95100))

....

OP said there were errors in the data set. You don't need the 0.5
check in the error check.

this assume that there are no errors in H2:H95


How so? Errors in H2:H95 will propagate to the ISERROR call here.

if there can be div errors there you could try

=SUM(IF(ISERROR((Main!I2:I95-Main!H2:H95)/(Main!I2:I95)0.5),0,
(Main!I2:I95-Main!H2:H95)/(Main!I2:I95)0.5)
*((IF(ISERROR(Main!H2:H95100),0,Main!H2:H95100) )))

....

And both will capture any other errors in the data set. If the data
set contained any #REF!, #NULL! or #NAME? errors, there's seldom any
good reason to ignore them. That is, these 3 errors usually indicate
something seriously wrong, so generally best to see them rather than
mask them.

So another alternative,

=SUM(IF(ISNUMBER(1/(ERROR.TYPE(Main!H2:H95/Main!I2:I95)=2)),0,
(Main!H2:H95/Main!I2:I95<0.5)*(Main!H2:H95100)))

which only traps #DIV/0! errors and replaces (I-H)/I0.5 with the
algebraically identical but more efficient H/I<0.5. Of course, if the
#DIV/0! errors were due to zeros in Main!I2:I95, the obvious
alternative would be

=SUMPRODUCT(--(2*Main!H2:H95<Main!I2:I95),--(Main!H2:H95100))

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
SUMPRODUCT - Ignore blank rows sahafi Excel Worksheet Functions 8 June 13th 07 06:11 PM
Ignore #N/A in a formula [email protected] Excel Discussion (Misc queries) 1 February 14th 07 03:16 PM
Ignore #N/A in a formula [email protected] Excel Discussion (Misc queries) 3 February 14th 07 06:02 AM
How can I ignore an #N/A value in a =SUM() formula? JD Excel Worksheet Functions 2 February 13th 06 04:50 PM
Sumproduct to ignore text and "" Ricky Pang Excel Worksheet Functions 6 December 10th 05 07:36 AM


All times are GMT +1. The time now is 12:58 AM.

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"