Average Multiple Table Columns if between Two Dates

jessebh2003

Board Regular
Joined
Feb 28, 2020
Messages
71
Office Version
  1. 365
Platform
  1. Windows
I have been racking my brain and searching the internet for a solution to no avail. Hopefully, someone may know an answer.

I'm trying to calculate the average of nine columns but only if the value falls within a date range. The below table is abbreviated for demonstration purposes as the actual table has almost 30,000 rows.

EvalResults.xlsx
EGHIJKLMNO
1SubmissionDateTheContentWasRelevantToMyWorkThisEventProvidedMeWithNewInformIIntendToUseWhatILearnedFromThisfacultyknowledgeablefacultyeffectivefacultyresponsivefacultyorganizedOverallTheConferenceWasFreeOfBiaTheLearningEnvironmentWasConduci
21/1/2021 0:48
31/1/2021 0:4844
41/1/2021 0:4844
51/1/2021 6:42
61/1/2021 6:4254
71/1/2021 6:4254
81/1/2021 9:48
91/1/2021 9:4844
101/1/2021 9:4844
Data


Here's what I've tried:

For reference - Year is a drop down in E1, and Jan is the month in E2 with Feb in G2, Mar in I2, etc.

1. Using AVERAGEIFS and CHOOSE - Populates #Value to a lot of cells
Excel Formula:
=AVERAGEIFS(CHOOSE({1,2,3,4,5,6,7,8,9},Table13[TheContentWasRelevantToMyWork],Table13[ThisEventProvidedMeWithNewInform],Table13[IIntendToUseWhatILearnedFromThis],Table13[facultyknowledgeable],Table13[facultyeffective],Table13[facultyresponsive],Table13[facultyorganized],Table13[OverallTheConferenceWasFreeOfBia],Table13[TheLearningEnvironmentWasConduci]),Table13[SubmissionDate],">="&DATE(Year,Jan,1),Table13[SubmissionDate],"<="&DATE(Year,Dec,31))

2. Using a Name Range - Returns a 0 value (ROL12CME references able13[TheContentWasRelevantToMyWork], Table13[ThisEventProvidedMeWithNewInform], Table13[IIntendToUseWhatILearnedFromThis], Table13[facultyknowledgeable], Table13[facultyeffective], Table13[facultyresponsive], Table13[facultyorganized], Table13[OverallTheConferenceWasFreeOfBia], Table13[TheLearningEnvironmentWasConduci])
Excel Formula:
=IFERROR(AVERAGEIFS(ROL12CME,Table13[SubmissionDate],">="&DATE(Year,Jan,1),Table13[SubmissionDate],"<="&DATE(Year,Dec,31)),0)

3. Using SUM, INDEX and FREQUENCY with and without a Name Range - Both returns an alert, "You've entered too few arguments for this function."
Excel Formula:
=IFS((SUM(Table13[TheContentWasRelevantToMyWork],Table13[ThisEventProvidedMeWithNewInform],Table13[IIntendToUseWhatILearnedFromThis],Table13[facultyknowledgeable],Table13[facultyeffective],Table13[facultyresponsive],Table13[facultyorganized],Table13[OverallTheConferenceWasFreeOfBia],Table13[TheLearningEnvironmentWasConduci])/INDEX(FREQUENCY((Table13[TheContentWasRelevantToMyWork],Table13[ThisEventProvidedMeWithNewInform],Table13[IIntendToUseWhatILearnedFromThis],Table13[facultyknowledgeable],Table13[facultyeffective],Table13[facultyresponsive],Table13[facultyorganized],Table13[OverallTheConferenceWasFreeOfBia],Table13[TheLearningEnvironmentWasConduci]),0),2)),Table13[SubmissionDate],">="&DATE(Year,Jan,1),Table13[SubmissionDate],"<="&DATE(Year,Dec,31)
Excel Formula:
=IFS((SUM(ROL12CME)/INDEX(FREQUENCY((ROL12CME),0),2)),Table13[SubmissionDate],">="&DATE(Year,Jan,1),Table13[SubmissionDate],"<="&DATE(Year,Dec,31)

Appreciate any help, ideas or suggestions. Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Ok try
Excel Formula:
=SUMPRODUCT((Table13[[TheContentWasRelevantToMyWork]:[TheLearningEnvironmentWasConduci]]),(ISNUMBER(Table13[[TheContentWasRelevantToMyWork]:[TheLearningEnvironmentWasConduci]]))*(Table13[SubmissionDate]>=DATE(2021,1,1))*(Table13[SubmissionDate]<DATE(2022,1,1)))/SUMPRODUCT((ISNUMBER(Table13[[TheContentWasRelevantToMyWork]:[TheLearningEnvironmentWasConduci]]))*(Table13[SubmissionDate]>=DATE(2021,1,1))*(Table13[SubmissionDate]<DATE(2022,1,1)))
 
Upvote 0
Solution
Ok try
Excel Formula:
=SUMPRODUCT((Table13[[TheContentWasRelevantToMyWork]:[TheLearningEnvironmentWasConduci]]),(ISNUMBER(Table13[[TheContentWasRelevantToMyWork]:[TheLearningEnvironmentWasConduci]]))*(Table13[SubmissionDate]>=DATE(2021,1,1))*(Table13[SubmissionDate]<DATE(2022,1,1)))/SUMPRODUCT((ISNUMBER(Table13[[TheContentWasRelevantToMyWork]:[TheLearningEnvironmentWasConduci]]))*(Table13[SubmissionDate]>=DATE(2021,1,1))*(Table13[SubmissionDate]<DATE(2022,1,1)))

Thanks, Fluff! That did the trick. Appreciate your help.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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