The two SUM formula are surplus to requirements, so perhaps start by taking them out...
=SUMIFS(AE:AE,AA:AA,"Arabica Shift",AB:AB,">0",AD:AD,">0",F:F,"No")/COUNTIFS(AA:AA,"Arabica Shift",AB:AB,">0",AD:AD,">0",F:F,"No",D:D,"1")
I also note your SUMIF isn't considering column D - is that what you intended?
Edited to add: If you told us what the error is then that would be useful.
Bookmarks