Average with conditions and a conversion

djmsenior

New Member
Joined
Jun 2, 2009
Messages
28
Office Version
  1. 365
Platform
  1. Windows
I'm trying to write a formula that finds the average from a table with 3 sets of criteria:
Agent = X
Activity = Y
Day = Z
Average duration for those conditions.
I've got the formula but 1 part of it requires an additional column (F) that converts the activity start date/time into the day of the month.

View attachment 94846


I've tried using DAY() on the Activity Start Date/Time column to eliminate the need for the extra conversion column, but just get an error.

1688662732334.png


Any help gratefully received.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
For some reason the original image didn't pull through...hopefully this will.

1688662852303.png
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also can you post your working formula.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also can you post your working formula.
O365 on Windows 10.

The working formula is in the screenshot.

Thanks for the heads up!
 
Upvote 0
Yes but that means I have to type it all out again. Hence I asked you to post the actual formula.
=AVERAGEIFS(Data!$E$2:$E$11,Data!$A$2:$A$11,$J$3,Data!$B$2:$B$11,$J4,Data!$F$2:$F$11,K$2)

As an FYI I have used something similar to this before in SUMPRODUCT MONTH()

=SUMPRODUCT(1*(MONTH(Data!G2:G190)=A3),1*((Data!S2:S190)=B3))

So maybe I just need to change the AVERAGEIFS to a SUMPRODUCT formula?
 
Upvote 0
Thanks for that, how about
Excel Formula:
=AVERAGE(FILTER(Data!$E$2:$E$11,(Data!$A$2:$A$11=$J$3)*(Data!$B$2:$B$11=$J4)*(DAY(Data!$C$2:$C$11)=K$2)))
 
Upvote 0
Thanks for that, how about
Excel Formula:
=AVERAGE(FILTER(Data!$E$2:$E$11,(Data!$A$2:$A$11=$J$3)*(Data!$B$2:$B$11=$J4)*(DAY(Data!$C$2:$C$11)=K$2)))
Many thanks for that Fluff! Works a treat. 👌
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,151
Messages
6,123,316
Members
449,094
Latest member
Chestertim

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