Help with a complex AVERAGEIFS formula

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
929
Office Version
  1. 365
Platform
  1. Windows
I have the below SUMIF formula that works in my spreadsheet that I would like to modify to AVERAGEIFS based on all of the same criteria minus the column to Average.

I tried to sub out SUMIFS with AVERAGEIFS but all I get is a #DIV/0! error. Not sure why I am getting the error. I have also tried specified ranges AA2:AA1000 etc but still get the error.

=SUMIFS('WO Report'!$F:$F,'WO Report'!$M:$M,AG2,'WO Report'!B:B,List!$B$2)+(SUMIFS('WO Report'!$F:$F,'WO Report'!$M:$M,AG2,'WO Report'!Z:Z,List!$B$2))

=AVERAGEIFS('WO Report'!$AA:$AA,'WO Report'!$M:$M,AG2,'WO Report'!B:B,List!$B$2)+(AVERAGEIFS('WO Report'!$AA:$AA,'WO Report'!$M:$M,AG2,'WO Report'!Z:Z,List!$B$2))


Additional info:

COLUMN AA has blanks, zeros and whole numbers in which to look at and average.
Column M is a date and AG is the date match
Column B is a customer name and B2 is the customer name selected by a drop down menu
Column Z:Z just has the word "ALL" to the bottom of the data for when B2 wants to view ALL customers.

Any and all help is appreciated!

Thank you!

Carla
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I'm just testing your formula on the first half, so ignoring the Z:Z part.

It returns, for me, a #DIV/0 error IF there is not customer name in column B with a corresponding matching date in column M.
But, if the customer name in col B DOES match the target customer name in B2, and the corresponding date on the same line DOES match the target date, then I get a non-error result.
 
Upvote 0
There are matches so I am not sure why it is happening. I will edit the document and upload it to dropbox so you can take a look
 
Upvote 0
Example of expected results:

On the Dashboard sheet, if Green is selected;

If you go to the GraphData sheet (where the Averageif formulas are), I should be getting a result of
Oct 20: 2
Oct 29: 4
In Column G

And

2.66 for the Month of October in Column M.

On the Dashboard sheet, if ALL is selected;

I would get a result of:

Oct 20: 2
Oct 29: 1
Oct 31: 3

And for the Month of October: 2.4

Hope this helps

Thank you very much
smile.gif
 
Upvote 0
Thanks, but sorry, I don't want to follow your link.
Others on this board may be happy to do that.
 
Last edited:
Upvote 0
Since I was unable to get help with this formula I found a work around and calculated it manually using a series of sumif and countif formulas and averaging the result.
A lot more formulas and calculating time than I would have liked but I needed a solution.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

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