Averageifs Question

gmazza76

Well-known Member
Joined
Mar 19, 2011
Messages
767
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

I am trying to use the"averageifs" function to average a column based on the description and date.

I have been able to use the "averageifs" to match "1 description" and a date criteria (B6-1 yesterdays date) Formula 1, but I need to do this to include up to 3 descriptions that fall under 1 group.

I have tried the following as an array "Formula 2" which works but I am unsure how I can add the date specifications in.
I have tried doing 2 averageifs adding them together and dividing by 2 but this doesn't work

Code:
Formula 1
=AVERAGEIFS(Call_Data!Q:Q,Call_Data!F:F,"Description",Call_Data!C:C,Calcs!$B$6-1)
[code/]
[code]
Formula 2
=AVERAGE(IF(ISNUMBER(MATCH(Call_Data!F:F, {"Description 1","Description 2"},0)),Call_Data!Q:Q))
[code/]

thanks in advance
 
I think for a longer list of descriptions, I would be inclined to list them in the sheet rather than the formula,

=AVERAGE(IF(Call_Data!C2:C7=Calcs!B6-1,IF(F2:F7=TRANSPOSE(List!A2:A10),Call_Data!Q2:Q7)))

where List!A2:A10 holds the list of descriptions.
Have to be careful about blanks in List!A2:A10 and/or Call_Data! column F with that structure??

Single sheet demo here where this averages Q2, Q3 and Q5 (6 times)

20 04 01.xlsm
ABCFQ
1
2Description 131/03/2020Description 11
3Description 231/03/2020Description 32
4Description 328/03/2020Description 33
531/03/20204
61/04/202028/03/2020Description 15
728/03/2020Description 36
8
93.375
Sample
Cell Formulas
RangeFormula
B6B6=TODAY()
B9B9=AVERAGE(IF(C2:C7=B6-1,IF(F2:F7=TRANSPOSE(A2:A10),Q2:Q7)))
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,905
Messages
6,122,172
Members
449,071
Latest member
cdnMech

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