Averaging a range of non-required item totals if "ERR" is not present in the range

drake171

New Member
Joined
Apr 12, 2018
Messages
4
I'm having trouble writing a formula that does the following:
  • If "ERR" is present in any cells within the range, return "ERR"
  • If "ERR" is not present in the range, return the average of the range

Seems like this should be a simple formula I just haven't figured out how to make it work as expected!

I am trying to obtain total average compliance for standard items (16 total) as well as area-specific items (could be zero items, or up to 10 items depending on the area). For the standard/required items I used the following formula, it just isn't applicable for the non-required items, so I'm stuck:

=IF(COUNT(AM10:BB10)=16,AVERAGE(AM10:BG10),"ERR")

Any help is greatly appreciated!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Is this ERR just a text value, that is, it is not an error value Excel generates?

If text...

=IF(ISNUMBER(MATCH("err",AM10:BG10,0)),"ERR",AVERAGE(AM10:BG10))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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