DanaD

DanaD

New Member
Joined
Apr 20, 2011
Messages
3
Hello to all. I have a doozy of an excel question. This is my formula:

=SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=$A34),--('Toyota Sale'!$D$8:$D$71=$A$9),'Toyota Sale'!$W$8:$W$71)/SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=A34),--('Toyota Sale'!$D$8:$D$71=A9))

What I now need is to get rid of the #DIV/0! that appears when my target cells are blank. Can anyone do this by modifying my formula?

Thanks for your consideration.

:pray:
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Does this do the trick?
=IF(SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=A34),--('Toyota Sale'!$D$8:$D$71=A9)),SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=$A34),--('Toyota Sale'!$D$8:$D$71=$A$9),'Toyota Sale'!$W$8:$W$71)/SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=A34),--('Toyota Sale'!$D$8:$D$71=A9)),0)
 
Upvote 0
Hello to all. I have a doozy of an excel question. This is my formula:

=SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=$A34),--('Toyota Sale'!$D$8:$D$71=$A$9),'Toyota Sale'!$W$8:$W$71)/SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=A34),--('Toyota Sale'!$D$8:$D$71=A9))

What I now need is to get rid of the #DIV/0! that appears when my target cells are blank. Can anyone do this by modifying my formula?

Thanks for your consideration.

:pray:
What version of Excel are you using?
 
Upvote 0
Welcome to the board...

Try this

Code:
=LOOKUP(9.99999999999999E+307,CHOOSE({1,2},0,SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=$A34),--('Toyota Sale'!$D$8:$D$71=$A$9),'Toyota Sale'!$W$8:$W$71)/SUMPRODUCT(--('Toyota Sale'!$F$8:$F$71=A34),--('Toyota Sale'!$D$8:$D$71=A9))
))

It will return a 0 instead of #DIV/0!

Hope that helps.
 
Upvote 0
Hello nijimack.

Worked like a charm. I was trying every use of IF,0 but the correct one. You deserve a beer for sure, eh.

Thanks a bunch.

DanaD
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,328
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top