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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,827
Messages
6,121,803
Members
449,048
Latest member
greyangel23

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