Averageifs... with date range.

buzz71023

Active Member
Joined
May 29, 2011
Messages
295
Office Version
  1. 2016
Platform
  1. Windows
I have the formula below that I got from help with here yesterday.
Now I am needing to add a date range to it.
If possible I would like for the user to be able to enter the date range in to Cells Y23 (start date) and Z23 (end date).

So in other words. the user will input his range into Y23 and Z23 and then the average will be taken like the formula.

thanks in advance.

Code:
=AVERAGEIFS(C:C,A:A,"GA 04",C:C,"<>0")
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try:
=AVERAGEIFS(C1:C7,A1:A7,"GA 06",C1:C7,"<>0",Your date range,">="&$Y$23,Your date range,"<="&$Z$23)
 
Last edited:
Upvote 0
Thanks for the reply but I have a question.
What is the "Your date range" for in the formula?
I am wanting the user to be able to change the date range by changing the date entered in Y23 and Z23.
 
Upvote 0
The date range is the column where your dates are located. You didn't state which column had the dates listed. The user would enter the start and end dates in Y23 & Z23.
 
Upvote 0
Just realized I left a very important piece of information out of my original post.
Dates are populated in column B:B
 
Upvote 0
You're welcome. Also, it usually best not to reference whole columns in a formula. If your data would never go below row 2000, then better to use something like A2:A2000 (assuming your data starts in row 2 with headers in row 1).
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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