Forum Discussion
J-Des000
Nov 18, 2024Brass Contributor
Calculating amounts between two month dates using AVERAGEIFS?
How do I use the AVERAGEIFS function to filter out any amounts between a start month and end month (e.g between October - month 10, and March - month 3)? Any amounts that have monthly dates that fall...
NikolinoDE
Nov 18, 2024Platinum Contributor
If your date range spans from October (month 10) to March (month 3) and crosses the year boundary, you'll need to handle the year change carefully. For example, if you have data spanning from October 2023 to March 2024, you need to adjust the year handling within your formula.
Example:
Column A with dates (A2:A100)
Column B with amounts (B2:B100)
For cases where the month range crosses into a new year:
=AVERAGEIFS(B2:B100, A2:A100, ">="&DATE(YEAR(TODAY())-1, 10, 1), A2:A100, "<="&DATE(YEAR(TODAY()), 3, 31))