In the attached both these approaches produce the same averages.
|
I |
J |
K |
L |
3 |
|
|
|
|
4 |
1/1/20 |
6.875 |
|
|
5 |
2/1/20 |
5.285714 |
|
|
6 |
3/1/20 |
4.6 |
|
|
7 |
|
|
|
|
8 |
|
# of days |
# units |
average? |
9 |
1/1/20 |
8 |
55 |
6.875 |
10 |
2/1/20 |
7 |
37 |
5.285714 |
11 |
3/1/20 |
10 |
46 |
4.6 |
With the first day of each month in Table1 listed in column I this in cell J4 and filled down.
Formula:
=AVERAGEIFS($F:$F,$E:$E,">"&EOMONTH($I4,-1),$E:$E,"<="&EOMONTH($I4,0))
The other approach (more resembling the one in your upload) again with first day of the month in column I this in J9 and filled down to get the counts.
Formula:
=COUNTIFS($E:$E,">"&EOMONTH(I9,-1),$E:$E,"<="&EOMONTH(I9,0)
Then to sum units this in K9 and copied down.
Formula:
=SUMIFS($F:$F,$E:$E,">"&EOMONTH(I9,-1),$E:$E,"<="&EOMONTH(I9,0))
Then for the monthly averages this in L9 and copied down.
Formula:
=K9/J9
Does this do what you want?
Bookmarks