Average If using Dates

mawilson12

New Member
Joined
Jan 17, 2008
Messages
35
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
I have a formula =AVERAGEIFS(J:J,H:H,">=3/1/2018") - where H is a date and J is number, so I am taking an average of everything that is greater than a date.

What I WOULD LIKE TO DO is substitute the date with cell location, like in another part of the spreadsheet, so that I can list every month from 2004 to 2017 and get a running average.

Something like "=AVERAGEIFS(J:J,H:H,">='K2")
and
"=AVERAGEIFS(J:J,H:H,">='K3") and so on.

Is this possible?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Use:

=AVERAGEIFS($J$1:$J$10000, $H$1:$H$10000, ">=" & K2)

Generally, it is better to use a restricted range like J1:J10000 instead of J:J. J:J refers to a column of 1M+ cells. It is unclear if Excel is clever enough to ignore cells below the last-used row.

----

PS.... ">=" & DATE(2018,3,1) is better than ">=3/1/2018" because 3/1/2018 can be interpreted as Jan 3 in some regions, instead of Mar 1. In fact, you might have intended DATE(2018,1,3).
 
Last edited:
Upvote 0
I think I figured it out.


I concatenated the cell

=AVERAGEIFS(J:J,H:H,T5)

Where T5 is =CONCATENATE(S5,P5,R5)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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