Help fixing a formula

datadummy

Active Member
Joined
Mar 16, 2017
Messages
313
Office Version
  1. 365
Platform
  1. Windows
I am trying to fix a formula and am not having any luck, here is my current formula that is returning #Div/0!,

=SUM(COUNTIFS(June!E:E,{"FBC","Maternal Child"},June!AV:AV,{"Patient is a retired MD, and has a good understanding of his course of care.","No concerns at this time.","Nursing staff is excellent.","Spoke to son as patient has dementia."}))/SUM(COUNTIFS(June!E:E,{"FBC","Maternal Child"},June!AV:AV,"?*"))

Not sure where my error is...
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
You are trying to divide by zero.
So that means that this part is equal to zero in some cases:
SUM(COUNTIFS(June!E:E,{"FBC","Maternal Child"},June!AV:AV,"?*"))

So, you can either first check to see if that part is zero like this:
=IF(
SUM(COUNTIFS(June!E:E,{"FBC","Maternal Child"},June!AV:AV,"?*"))=0,"",SUM(COUNTIFS(June!E:E,{"FBC","Maternal Child"},June!AV:AV,{"Patient is a retired MD, and has a good understanding of his course of care.","No concerns at this time.","Nursing staff is excellent.","Spoke to son as patient has dementia."}))/SUM(COUNTIFS(June!E:E,{"FBC","Maternal Child"},June!AV:AV,"?*")))

or you can use IFERROR, i.e.
=IFERROR(SUM(COUNTIFS(June!E:E,{"FBC","Maternal Child"},June!AV:AV,{"Patient is a retired MD, and has a good understanding of his course of care.","No concerns at this time.","Nursing staff is excellent.","Spoke to son as patient has dementia."}))/SUM(COUNTIFS(June!E:E,{"FBC","Maternal Child"},June!AV:AV,"?*")),"")
 
Last edited:
Upvote 0
That worked but now I am being asked to turn the formula around and count column E "Heart Center" subtracted by any text that is in column AV and divide that by Column E "Heart Center". Ay thoughts?
 
Upvote 0
I haven't analyzed your original equation to understand exactly what it is that you are trying to do (and you didn't say what it is actually doing).
But, in the equations I provided, if you need it to return 0 instead of nothing so that it can be used in mathematical equations, then replace the instances of "" with 0.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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