zero cell dividing by a zero cell

Jane Collins

New Member
Joined
Jul 22, 2005
Messages
17
I am using this formula to return a count then dividing by a number cell to give a percentage. this formula does work except when the count result is zero and the dividing cell is also zero.

How can I edit my formula to show a zero instead of #DIVO! but keep the same formula to?

=COUNT(IF(Open!$B$2:$B$5000=$C136,IF(Open!$A$2:$A$5000=E$2,IF(Open!$H$2:$H$5000=$D136,Open!$H$2:$H$5000))))/E$81
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi Jane

This should work:

=IF(E$81=0,0,COUNT(IF(Open!$B$2:$B$5000=$C136,IF(Open!$A$2:$A$5000=E$2,IF(Open!$H$2:$H$5000=$D136,Open!$H$2:$H$5000))))/E$81)

Confirmed with Ctrl+Shift+Enter

Best regards

Richard
 
Upvote 0

Forum statistics

Threads
1,214,988
Messages
6,122,620
Members
449,092
Latest member
amyap

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