# zero cell dividing by a zero cell

#### Jane Collins

##### New Member
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

Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

#### Richard Schollar

##### MrExcel MVP
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

#### Jane Collins

##### New Member
Thank you - it does work!

Replies
0
Views
201
Replies
7
Views
305
Replies
13
Views
593
Replies
10
Views
357
Replies
1
Views
431

1,195,650
Messages
6,010,920
Members
441,572
Latest member
keobongda8812

### 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.

### Which adblocker are you using?

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

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