Get bottom average score based on month

Firasath

Board Regular
Joined
Feb 20, 2011
Messages
137
Office Version
  1. 365
Hi,

I'm trying to get average score based on starting cell of Quartile-1 value and the last cell of the range. I used the same formula without applying filter on month and it worked file but when I want to retrieve the results based on a month, the formula with the filter function not working. Please find below the formula and advise where I am making mistake. The formula I am using is as follows:

=LET(m,NV!$A:$A,s,NV!$AH:$AH,f,FILTER(NV!$AH:$AH,(m>=I47)*(m<=EOMONTH(I47,0))),AVERAGE(INDIRECT((ADDRESS(MATCH(QUARTILE.INC(f,1),s,0),MATCH("Overall Score",NV!1:1,0),1))):INDIRECT(ADDRESS(MAX(FILTER(f,ROW(s))),MAX(FILTER(f,COLUMN(s))),1))))

EGS BQ.xlsb
IJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAO
47Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21Jan-22Feb-22Mar-22Apr-22May-22Jun-22Jul-22Aug-22Sep-22Oct-22Nov-22Dec-22Jan-23Feb-23Mar-23Apr-23######Jun-23Jul-23Aug-23Sep-23   
48 =LET(m,NV!$A:$A,s,NV!$AH:$AH,f,FILTER(NV!$AH:$AH,(m>=I47)*(m<=EOMONTH(I47,0))),AVERAGE(INDIRECT((ADDRESS(MATCH(QUARTILE.INC(f,1),s,0),MATCH("Overall Score",NV!1:1,0),1))):INDIRECT(ADDRESS(MAX(FILTER(f,ROW(s))),MAX(FILTER(f,COLUMN(s))),1))))
BQ_Summary
Cell Formulas
RangeFormula
AM47:AO47AM47=IF(AM44="","",AM44)
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
A possible solution is to replace the INDIRECT function with INDEX function to create a dynamic range based on the results.

You can modify your formula as follows:

VBA Code:
=LET(m,NV!$A:$A,s,NV!$AH:$AH,f,FILTER(NV!$AH:$AH,(m>=I47)*(m<=EOMONTH(I47,0))),startcol,MATCH(QUARTILE.INC(f,1),s,0),endcol,MAX(FILTER(f,COLUMN(s))),AVERAGE(INDEX(NV!$1:$1048576, MATCH("Overall Score",NV!$1:$1,0), startcol):INDEX(NV!$1:$1048576, MAX(FILTER(f,ROW(s))), endcol)))

The formula uses the INDEX function to dynamically create a range based on the filtered results.

The formula assumes that the data is in columns A to AH and that the score values are in the column AH.

-----

Without seeing the data and filter conditions, it's difficult to determine the exact issue. However, one possibility is that the FILTER function is not returning the correct range of cells for the calculation of the average score.

You can this by trying to use the VLOOKUP function instead of the INDIRECT function to retrieve the the last cell of the range. The VLOOKUP function can help you find the correct cells even when the data is filtered.

Here's an example

Code:
=LET(m,NV!$A:$A,s,NV!$AH:$AH,f,FILTER(NV!$AH:$AH,(m>=I47)*(m<=EOMONTH(I47,0))),q1,VLOOKUP(QUARTILE.INC(f,1),s,1,FALSE),ls,VLOOKUP("Overall Score",NV!1:1,MATCH("Overall Score",NV!1:1,0),FALSE),AVERAGE(INDIRECT((ADDRESS(MATCH(q1,s,0),MATCH(ls,NV!1:1,0),1))):INDIRECT(ADDRESS(MAX(FILTER(f,ROW(s))),MAX(FILTER(f,COLUMN(s))),1))))

In this formula, you use VLOOKUP to find the Quartile-1 value and the last cell of the range and the column number for the "Overall Score" header.
 
Upvote 0
Can you post some sample data.
 
Upvote 0
A possible solution is to replace the INDIRECT function with INDEX function to create a dynamic range based on the results.

You can modify your formula as follows:

VBA Code:
=LET(m,NV!$A:$A,s,NV!$AH:$AH,f,FILTER(NV!$AH:$AH,(m>=I47)*(m<=EOMONTH(I47,0))),startcol,MATCH(QUARTILE.INC(f,1),s,0),endcol,MAX(FILTER(f,COLUMN(s))),AVERAGE(INDEX(NV!$1:$1048576, MATCH("Overall Score",NV!$1:$1,0), startcol):INDEX(NV!$1:$1048576, MAX(FILTER(f,ROW(s))), endcol)))

The formula uses the INDEX function to dynamically create a range based on the filtered results.

The formula assumes that the data is in columns A to AH and that the score values are in the column AH.

-----

Without seeing the data and filter conditions, it's difficult to determine the exact issue. However, one possibility is that the FILTER function is not returning the correct range of cells for the calculation of the average score.

You can this by trying to use the VLOOKUP function instead of the INDIRECT function to retrieve the the last cell of the range. The VLOOKUP function can help you find the correct cells even when the data is filtered.

Here's an example

Code:
=LET(m,NV!$A:$A,s,NV!$AH:$AH,f,FILTER(NV!$AH:$AH,(m>=I47)*(m<=EOMONTH(I47,0))),q1,VLOOKUP(QUARTILE.INC(f,1),s,1,FALSE),ls,VLOOKUP("Overall Score",NV!1:1,MATCH("Overall Score",NV!1:1,0),FALSE),AVERAGE(INDIRECT((ADDRESS(MATCH(q1,s,0),MATCH(ls,NV!1:1,0),1))):INDIRECT(ADDRESS(MAX(FILTER(f,ROW(s))),MAX(FILTER(f,COLUMN(s))),1))))

In this formula, you use VLOOKUP to find the Quartile-1 value and the last cell of the range and the column number for the "Overall Score" header.
Thanks for your response.

I tried above formula but is is giving error stating something "Are you trying to type formula", i am pasting some data below with your suggested formula. Appreciate to check and update the formula accordingly.

Book6
ABCDEF
1MonthOverall ScoreJul-22Aug-22Feb-23
2Jul-2276.56 =LET(m,$A:$A,s,$B:$B,f,FILTER($B:$B,(m>=D$1)*(m<=EOMONTH(D$1,0))),q1,VLOOKUP(QUARTILE.INC(f,1),s,1,FALSE), ls,VLOOKUP("Overall Score",A$1:B$1,MATCH("Overall Score",$A$1:$B$1,0),FALSE), AVERAGE(INDIRECT((ADDRESS(MATCH(q1,s,0),MATCH(ls,A$1:B$1,0),1))):INDIRECT(ADDRESS(MAX(FILTER(f,ROW(s))),MAX(FILTER(f,COLUMN(s))),1))))
3Jul-2275.00
4Jul-2275.00
5Jul-2275.00
6Jul-2275.00
7Jul-2268.75
8Jul-2268.75
9Jul-2268.75
10Jul-2268.75
11Jul-2268.75
12Jul-2268.75
13Jul-2264.84
14Jul-2262.50
15Jul-2260.94
16Jul-2260.94
17Jul-2260.94
18Jul-2259.90
19Jul-2257.03
20Jul-2253.13
21Jul-2253.13
22Jul-2253.13
23Jul-2253.13
24Jul-2253.13
25Jul-2252.52
26Jul-2249.22
27Jul-2249.22
28Jul-2249.22
29Jul-2249.22
30Jul-2248.61
31Jul-2245.31
32Jul-2245.31
33Jul-2245.31
34Jul-2245.31
35Jul-2244.70
36Jul-2241.41
37Jul-2241.41
38Jul-2241.41
39Jul-2241.41
40Jul-2241.41
41Jul-2241.41
42Jul-2241.41
43Jul-2241.41
44Jul-2239.38
45Jul-2237.76
46Jul-2237.50
47Jul-2237.50
48Jul-2237.50
49Jul-2237.50
50Jul-2237.50
51Jul-2237.50
52Jul-2237.50
53Jul-2237.50
54Jul-2237.50
55Jul-2237.50
56Jul-2237.50
57Jul-2237.50
58Jul-2237.50
59Jul-2237.50
60Jul-2237.50
61Jul-2237.50
62Jul-2237.50
63Jul-2237.50
64Jul-2237.50
65Jul-2237.50
66Jul-2237.50
67Jul-2237.50
68Jul-2237.50
69Jul-2237.50
70Jul-2237.50
71Jul-2236.89
72Jul-2231.25
73Jul-2231.25
74Jul-2231.25
75Jul-2230.28
76Jul-2230.00
77Jul-2228.65
78Jul-2225.17
79Jul-2223.44
80Jul-2221.27
81Jul-2221.27
82Jul-2221.27
83Jul-2220.66
84Jul-2219.37
85Jul-220.00
86Jul-220.00
87Jul-220.00
88Jul-220.00
89Aug-2282.03
90Aug-2268.75
91Aug-2268.75
92Aug-2268.75
93Aug-2264.84
94Aug-2261.53
95Aug-2260.94
96Aug-2260.94
97Aug-2260.94
98Aug-2260.63
99Aug-2257.03
100Aug-2257.03
101Aug-2253.72
102Aug-2253.13
103Aug-2253.13
104Aug-2250.00
105Aug-2250.00
106Aug-2250.00
107Aug-2249.22
108Aug-2249.22
109Aug-2249.22
110Aug-2249.22
111Aug-2249.22
112Aug-2245.31
113Aug-2245.31
114Aug-2241.88
115Aug-2241.41
116Aug-2241.41
117Aug-2241.41
118Aug-2237.50
119Aug-2237.50
120Aug-2237.50
121Aug-2237.50
122Aug-2237.50
123Aug-2237.50
124Aug-2237.50
125Aug-2237.50
126Aug-2237.50
127Aug-2237.50
128Aug-2237.50
129Aug-2237.50
130Aug-2237.50
131Aug-2237.50
132Aug-2237.50
133Aug-2237.50
134Aug-2237.50
135Aug-2237.50
136Aug-2237.50
137Aug-2237.50
138Aug-2237.50
139Aug-2237.50
140Aug-2237.50
141Aug-2237.50
142Aug-2237.50
143Aug-2237.50
144Aug-2237.50
145Aug-2237.50
146Aug-2237.50
147Aug-2237.50
148Aug-2237.50
149Aug-2237.50
150Aug-2237.50
151Aug-2237.50
152Aug-2234.79
153Aug-2232.86
154Aug-2230.28
155Aug-2227.34
156Aug-2226.68
157Aug-2221.88
158Aug-2220.00
159Aug-2220.00
160Aug-2215.02
161Aug-2212.25
162Aug-226.51
163Aug-225.03
164Aug-225.03
165Aug-220.00
166Aug-220.00
167Aug-220.00
168Feb-2393.75
169Feb-2393.75
170Feb-2393.75
171Feb-2393.75
172Feb-2393.75
173Feb-2393.75
174Feb-2393.75
175Feb-2393.75
176Feb-2393.75
177Feb-2393.75
178Feb-2393.75
179Feb-2391.04
180Feb-2389.84
181Feb-2389.84
182Feb-2389.84
183Feb-2389.11
184Feb-2385.94
185Feb-2385.94
186Feb-2385.94
187Feb-2382.03
188Feb-2382.03
189Feb-2382.03
190Feb-2380.36
191Feb-2378.13
192Feb-2378.13
193Feb-2378.13
194Feb-2377.52
195Feb-2377.52
196Feb-2377.52
197Feb-2375.94
198Feb-2374.22
199Feb-2374.22
200Feb-2374.22
201Feb-2371.88
202Feb-2371.43
203Feb-2370.31
204Feb-2370.31
205Feb-2366.41
206Feb-2366.41
207Feb-2366.41
208Feb-2366.41
209Feb-2365.80
210Feb-2362.50
211Feb-2362.50
212Feb-2362.50
213Feb-2362.50
214Feb-2362.50
215Feb-2362.50
216Feb-2362.50
217Feb-2362.50
218Feb-2362.50
219Feb-2362.50
220Feb-2362.50
221Feb-2362.50
222Feb-2362.50
223Feb-2362.50
224Feb-2362.50
225Feb-2362.50
226Feb-2362.50
227Feb-2362.50
228Feb-2362.50
229Feb-2362.50
230Feb-2362.50
231Feb-2362.50
232Feb-2362.50
233Feb-2362.50
234Feb-2362.50
235Feb-2362.50
236Feb-2362.50
237Feb-2362.50
238Feb-2362.50
239Feb-2362.50
240Feb-2362.50
241Feb-2362.50
242Feb-2362.50
243Feb-2362.50
244Feb-2362.50
245Feb-2362.50
246Feb-2362.50
247Feb-2362.50
248Feb-2362.50
249Feb-2362.50
250Feb-2362.50
251Feb-2362.50
252Feb-2362.50
253Feb-2362.50
254Feb-2362.50
255Feb-2362.50
256Feb-2362.50
257Feb-2362.50
258Feb-2362.20
259Feb-2361.02
260Feb-2360.12
261Feb-2359.79
262Feb-2359.79
263Feb-2357.98
264Feb-2357.86
265Feb-2356.25
266Feb-2356.25
267Feb-2354.38
268Feb-2354.38
269Feb-2354.38
270Feb-2350.00
271Feb-2350.00
272Feb-2350.00
273Feb-2350.00
274Feb-2348.44
275Feb-2346.27
276Feb-2346.27
277Feb-2346.27
278Feb-2344.53
279Feb-2342.79
280Feb-2338.89
281Feb-2336.12
282Feb-2334.42
283Feb-2330.03
284Feb-2330.03
285Feb-2330.00
286Feb-2330.00
287Feb-2328.91
288Feb-2325.00
289Feb-2325.00
290Feb-2325.00
291Feb-2325.00
292Feb-2325.00
293Feb-2325.00
Sheet1
 
Upvote 0
Thanks for that.
Is this what you want?
Fluff.xlsm
ABCDEF
1MonthOverall Score01/07/202201/08/202201/02/2023
201/07/202276.562530.28600730.51388941.695175
301/07/202275
401/07/202275
501/07/202275
601/07/202275
701/07/202268.75
801/07/202268.75
901/07/202268.75
1001/07/202268.75
1101/07/202268.75
1201/07/202268.75
1301/07/202264.84375
1401/07/202262.5
1501/07/202260.9375
1601/07/202260.9375
1701/07/202260.9375
1801/07/202259.8952184
1901/07/202257.03125
2001/07/202253.125
2101/07/202253.125
2201/07/202253.125
2301/07/202253.125
2401/07/202253.125
2501/07/202252.5162338
2601/07/202249.21875
2701/07/202249.21875
2801/07/202249.21875
2901/07/202249.21875
3001/07/202248.6099838
3101/07/202245.3125
3201/07/202245.3125
3301/07/202245.3125
3401/07/202245.3125
3501/07/202244.7037338
3601/07/202241.40625
3701/07/202241.40625
3801/07/202241.40625
3901/07/202241.40625
4001/07/202241.40625
4101/07/202241.40625
4201/07/202241.40625
4301/07/202241.40625
4401/07/202239.375
4501/07/202237.7582645
4601/07/202237.5
4701/07/202237.5
4801/07/202237.5
4901/07/202237.5
5001/07/202237.5
5101/07/202237.5
5201/07/202237.5
5301/07/202237.5
5401/07/202237.5
5501/07/202237.5
5601/07/202237.5
5701/07/202237.5
5801/07/202237.5
5901/07/202237.5
6001/07/202237.5
6101/07/202237.5
6201/07/202237.5
6301/07/202237.5
6401/07/202237.5
6501/07/202237.5
6601/07/202237.5
6701/07/202237.5
6801/07/202237.5
6901/07/202237.5
7001/07/202237.5
7101/07/202236.8912338
7201/07/202231.25
7301/07/202231.25
7401/07/202231.25
7501/07/202230.2849928
7601/07/202230
7701/07/202228.6452184
7801/07/202225.1724838
7901/07/202223.4375
8001/07/202221.2662338
8101/07/202221.2662338
8201/07/202221.2662338
8301/07/202220.6574675
8401/07/202219.3747101
8501/07/20220
8601/07/20220
8701/07/20220
8801/07/20220
8901/08/202282.03125
9001/08/202268.75
9101/08/202268.75
9201/08/202268.75
9301/08/202264.84375
9401/08/202261.5349928
9501/08/202260.9375
9601/08/202260.9375
9701/08/202260.9375
9801/08/202260.6331169
9901/08/202257.03125
10001/08/202257.03125
10101/08/202253.7224928
10201/08/202253.125
10301/08/202253.125
10401/08/202250
10501/08/202250
10601/08/202250
10701/08/202249.21875
10801/08/202249.21875
10901/08/202249.21875
11001/08/202249.21875
11101/08/202249.21875
11201/08/202245.3125
11301/08/202245.3125
11401/08/202241.875
11501/08/202241.40625
11601/08/202241.40625
11701/08/202241.40625
11801/08/202237.5
11901/08/202237.5
12001/08/202237.5
12101/08/202237.5
12201/08/202237.5
12301/08/202237.5
12401/08/202237.5
12501/08/202237.5
12601/08/202237.5
12701/08/202237.5
12801/08/202237.5
12901/08/202237.5
13001/08/202237.5
13101/08/202237.5
13201/08/202237.5
13301/08/202237.5
13401/08/202237.5
13501/08/202237.5
13601/08/202237.5
13701/08/202237.5
13801/08/202237.5
13901/08/202237.5
14001/08/202237.5
14101/08/202237.5
14201/08/202237.5
14301/08/202237.5
14401/08/202237.5
14501/08/202237.5
14601/08/202237.5
14701/08/202237.5
14801/08/202237.5
14901/08/202237.5
15001/08/202237.5
15101/08/202237.5
15201/08/202234.7943723
15301/08/202232.8617811
15401/08/202230.2849928
15501/08/202227.34375
15601/08/202226.6774892
15701/08/202221.875
15801/08/202220
15901/08/202220
16001/08/202215.0224775
16101/08/202212.2474747
16201/08/20226.50826446
16301/08/20225.03246753
16401/08/20225.03246753
16501/08/20220
16601/08/20220
16701/08/20220
16801/02/202393.75
16901/02/202393.75
17001/02/202393.75
17101/02/202393.75
17201/02/202393.75
17301/02/202393.75
17401/02/202393.75
17501/02/202393.75
17601/02/202393.75
17701/02/202393.75
17801/02/202393.75
17901/02/202391.0443723
18001/02/202389.84375
18101/02/202389.84375
18201/02/202389.84375
18301/02/202389.1117811
18401/02/202385.9375
18501/02/202385.9375
18601/02/202385.9375
18701/02/202382.03125
18801/02/202382.03125
18901/02/202382.03125
19001/02/202380.3571429
19101/02/202378.125
19201/02/202378.125
19301/02/202378.125
19401/02/202377.5162338
19501/02/202377.5162338
19601/02/202377.5162338
19701/02/202375.9435877
19801/02/202374.21875
19901/02/202374.21875
20001/02/202374.21875
20101/02/202371.875
20201/02/202371.4285714
20301/02/202370.3125
20401/02/202370.3125
20501/02/202366.40625
20601/02/202366.40625
20701/02/202366.40625
20801/02/202366.40625
20901/02/202365.7974838
21001/02/202362.5
21101/02/202362.5
21201/02/202362.5
21301/02/202362.5
21401/02/202362.5
21501/02/202362.5
21601/02/202362.5
21701/02/202362.5
21801/02/202362.5
21901/02/202362.5
22001/02/202362.5
22101/02/202362.5
22201/02/202362.5
22301/02/202362.5
22401/02/202362.5
22501/02/202362.5
22601/02/202362.5
22701/02/202362.5
22801/02/202362.5
22901/02/202362.5
23001/02/202362.5
23101/02/202362.5
23201/02/202362.5
23301/02/202362.5
23401/02/202362.5
23501/02/202362.5
23601/02/202362.5
23701/02/202362.5
23801/02/202362.5
23901/02/202362.5
24001/02/202362.5
24101/02/202362.5
24201/02/202362.5
24301/02/202362.5
24401/02/202362.5
24501/02/202362.5
24601/02/202362.5
24701/02/202362.5
24801/02/202362.5
24901/02/202362.5
25001/02/202362.5
25101/02/202362.5
25201/02/202362.5
25301/02/202362.5
25401/02/202362.5
25501/02/202362.5
25601/02/202362.5
25701/02/202362.5
25801/02/202362.1956169
25901/02/202361.0242031
26001/02/202360.1229128
26101/02/202359.7943723
26201/02/202359.7943723
26301/02/202357.9849838
26401/02/202357.8617811
26501/02/202356.25
26601/02/202356.25
26701/02/202354.3831169
26801/02/202354.3831169
26901/02/202354.3831169
27001/02/202350
27101/02/202350
27201/02/202350
27301/02/202350
27401/02/202348.4375
27501/02/202346.2662338
27601/02/202346.2662338
27701/02/202346.2662338
27801/02/202344.53125
27901/02/202342.7934991
28001/02/202338.8872491
28101/02/202336.1201299
28201/02/202334.4155844
28301/02/202330.0324675
28401/02/202330.0324675
28501/02/202330
28601/02/202330
28701/02/202328.90625
28801/02/202325
28901/02/202325
29001/02/202325
29101/02/202325
29201/02/202325
29301/02/202325
Lists
Cell Formulas
RangeFormula
D2:F2D2=LET(m,$A2:$A500,s,$B2:$B500,f,FILTER(s,(m>=D$1)*(m<=EOMONTH(D$1,0))),AVERAGE(DROP(f,MATCH(QUARTILE.INC(f,1),f,0))))
 
Upvote 0
Thanks for that.
Is this what you want?
Fluff.xlsm
ABCDEF
1MonthOverall Score01/07/202201/08/202201/02/2023
201/07/202276.562530.28600730.51388941.695175
301/07/202275
401/07/202275
501/07/202275
601/07/202275
701/07/202268.75
801/07/202268.75
901/07/202268.75
1001/07/202268.75
1101/07/202268.75
1201/07/202268.75
1301/07/202264.84375
1401/07/202262.5
1501/07/202260.9375
1601/07/202260.9375
1701/07/202260.9375
1801/07/202259.8952184
1901/07/202257.03125
2001/07/202253.125
2101/07/202253.125
2201/07/202253.125
2301/07/202253.125
2401/07/202253.125
2501/07/202252.5162338
2601/07/202249.21875
2701/07/202249.21875
2801/07/202249.21875
2901/07/202249.21875
3001/07/202248.6099838
3101/07/202245.3125
3201/07/202245.3125
3301/07/202245.3125
3401/07/202245.3125
3501/07/202244.7037338
3601/07/202241.40625
3701/07/202241.40625
3801/07/202241.40625
3901/07/202241.40625
4001/07/202241.40625
4101/07/202241.40625
4201/07/202241.40625
4301/07/202241.40625
4401/07/202239.375
4501/07/202237.7582645
4601/07/202237.5
4701/07/202237.5
4801/07/202237.5
4901/07/202237.5
5001/07/202237.5
5101/07/202237.5
5201/07/202237.5
5301/07/202237.5
5401/07/202237.5
5501/07/202237.5
5601/07/202237.5
5701/07/202237.5
5801/07/202237.5
5901/07/202237.5
6001/07/202237.5
6101/07/202237.5
6201/07/202237.5
6301/07/202237.5
6401/07/202237.5
6501/07/202237.5
6601/07/202237.5
6701/07/202237.5
6801/07/202237.5
6901/07/202237.5
7001/07/202237.5
7101/07/202236.8912338
7201/07/202231.25
7301/07/202231.25
7401/07/202231.25
7501/07/202230.2849928
7601/07/202230
7701/07/202228.6452184
7801/07/202225.1724838
7901/07/202223.4375
8001/07/202221.2662338
8101/07/202221.2662338
8201/07/202221.2662338
8301/07/202220.6574675
8401/07/202219.3747101
8501/07/20220
8601/07/20220
8701/07/20220
8801/07/20220
8901/08/202282.03125
9001/08/202268.75
9101/08/202268.75
9201/08/202268.75
9301/08/202264.84375
9401/08/202261.5349928
9501/08/202260.9375
9601/08/202260.9375
9701/08/202260.9375
9801/08/202260.6331169
9901/08/202257.03125
10001/08/202257.03125
10101/08/202253.7224928
10201/08/202253.125
10301/08/202253.125
10401/08/202250
10501/08/202250
10601/08/202250
10701/08/202249.21875
10801/08/202249.21875
10901/08/202249.21875
11001/08/202249.21875
11101/08/202249.21875
11201/08/202245.3125
11301/08/202245.3125
11401/08/202241.875
11501/08/202241.40625
11601/08/202241.40625
11701/08/202241.40625
11801/08/202237.5
11901/08/202237.5
12001/08/202237.5
12101/08/202237.5
12201/08/202237.5
12301/08/202237.5
12401/08/202237.5
12501/08/202237.5
12601/08/202237.5
12701/08/202237.5
12801/08/202237.5
12901/08/202237.5
13001/08/202237.5
13101/08/202237.5
13201/08/202237.5
13301/08/202237.5
13401/08/202237.5
13501/08/202237.5
13601/08/202237.5
13701/08/202237.5
13801/08/202237.5
13901/08/202237.5
14001/08/202237.5
14101/08/202237.5
14201/08/202237.5
14301/08/202237.5
14401/08/202237.5
14501/08/202237.5
14601/08/202237.5
14701/08/202237.5
14801/08/202237.5
14901/08/202237.5
15001/08/202237.5
15101/08/202237.5
15201/08/202234.7943723
15301/08/202232.8617811
15401/08/202230.2849928
15501/08/202227.34375
15601/08/202226.6774892
15701/08/202221.875
15801/08/202220
15901/08/202220
16001/08/202215.0224775
16101/08/202212.2474747
16201/08/20226.50826446
16301/08/20225.03246753
16401/08/20225.03246753
16501/08/20220
16601/08/20220
16701/08/20220
16801/02/202393.75
16901/02/202393.75
17001/02/202393.75
17101/02/202393.75
17201/02/202393.75
17301/02/202393.75
17401/02/202393.75
17501/02/202393.75
17601/02/202393.75
17701/02/202393.75
17801/02/202393.75
17901/02/202391.0443723
18001/02/202389.84375
18101/02/202389.84375
18201/02/202389.84375
18301/02/202389.1117811
18401/02/202385.9375
18501/02/202385.9375
18601/02/202385.9375
18701/02/202382.03125
18801/02/202382.03125
18901/02/202382.03125
19001/02/202380.3571429
19101/02/202378.125
19201/02/202378.125
19301/02/202378.125
19401/02/202377.5162338
19501/02/202377.5162338
19601/02/202377.5162338
19701/02/202375.9435877
19801/02/202374.21875
19901/02/202374.21875
20001/02/202374.21875
20101/02/202371.875
20201/02/202371.4285714
20301/02/202370.3125
20401/02/202370.3125
20501/02/202366.40625
20601/02/202366.40625
20701/02/202366.40625
20801/02/202366.40625
20901/02/202365.7974838
21001/02/202362.5
21101/02/202362.5
21201/02/202362.5
21301/02/202362.5
21401/02/202362.5
21501/02/202362.5
21601/02/202362.5
21701/02/202362.5
21801/02/202362.5
21901/02/202362.5
22001/02/202362.5
22101/02/202362.5
22201/02/202362.5
22301/02/202362.5
22401/02/202362.5
22501/02/202362.5
22601/02/202362.5
22701/02/202362.5
22801/02/202362.5
22901/02/202362.5
23001/02/202362.5
23101/02/202362.5
23201/02/202362.5
23301/02/202362.5
23401/02/202362.5
23501/02/202362.5
23601/02/202362.5
23701/02/202362.5
23801/02/202362.5
23901/02/202362.5
24001/02/202362.5
24101/02/202362.5
24201/02/202362.5
24301/02/202362.5
24401/02/202362.5
24501/02/202362.5
24601/02/202362.5
24701/02/202362.5
24801/02/202362.5
24901/02/202362.5
25001/02/202362.5
25101/02/202362.5
25201/02/202362.5
25301/02/202362.5
25401/02/202362.5
25501/02/202362.5
25601/02/202362.5
25701/02/202362.5
25801/02/202362.1956169
25901/02/202361.0242031
26001/02/202360.1229128
26101/02/202359.7943723
26201/02/202359.7943723
26301/02/202357.9849838
26401/02/202357.8617811
26501/02/202356.25
26601/02/202356.25
26701/02/202354.3831169
26801/02/202354.3831169
26901/02/202354.3831169
27001/02/202350
27101/02/202350
27201/02/202350
27301/02/202350
27401/02/202348.4375
27501/02/202346.2662338
27601/02/202346.2662338
27701/02/202346.2662338
27801/02/202344.53125
27901/02/202342.7934991
28001/02/202338.8872491
28101/02/202336.1201299
28201/02/202334.4155844
28301/02/202330.0324675
28401/02/202330.0324675
28501/02/202330
28601/02/202330
28701/02/202328.90625
28801/02/202325
28901/02/202325
29001/02/202325
29101/02/202325
29201/02/202325
29301/02/202325
Lists
Cell Formulas
RangeFormula
D2:F2D2=LET(m,$A2:$A500,s,$B2:$B500,f,FILTER(s,(m>=D$1)*(m<=EOMONTH(D$1,0))),AVERAGE(DROP(f,MATCH(QUARTILE.INC(f,1),f,0))))
Thanks Fluff. I amended the formula as I was getting #N/A error for few months. With the below formula, I'm getting correct results from Sep-20 onwards but for the month of Feb-23 the result isn't matching. Couldn't figure out the reason for the same. Please support.

Book9
ABCDEFG
1MonthOverall ScoreFeb-23
2Feb-2393.7541.70** Score should be 42.24
3Feb-2393.75
4Feb-2393.75Quartile-1 resut:59.79437
5Feb-2393.75Starting Cell ReferenceB95
6Feb-2393.75Avg. Req. for 33 rows42.24
7Feb-2393.75Avg. Req. for 32 rows41.70
8Feb-2393.75
9Feb-2393.75
10Feb-2393.75
11Feb-2393.75
12Feb-2393.75
13Feb-2391.04437229
14Feb-2389.84375
15Feb-2389.84375
16Feb-2389.84375
17Feb-2389.11178108
18Feb-2385.9375
19Feb-2385.9375
20Feb-2385.9375
21Feb-2382.03125
22Feb-2382.03125
23Feb-2382.03125
24Feb-2380.35714286
25Feb-2378.125
26Feb-2378.125
27Feb-2378.125
28Feb-2377.51623377
29Feb-2377.51623377
30Feb-2377.51623377
31Feb-2375.94358766
32Feb-2374.21875
33Feb-2374.21875
34Feb-2374.21875
35Feb-2371.875
36Feb-2371.42857143
37Feb-2370.3125
38Feb-2370.3125
39Feb-2366.40625
40Feb-2366.40625
41Feb-2366.40625
42Feb-2366.40625
43Feb-2365.79748377
44Feb-2362.5
45Feb-2362.5
46Feb-2362.5
47Feb-2362.5
48Feb-2362.5
49Feb-2362.5
50Feb-2362.5
51Feb-2362.5
52Feb-2362.5
53Feb-2362.5
54Feb-2362.5
55Feb-2362.5
56Feb-2362.5
57Feb-2362.5
58Feb-2362.5
59Feb-2362.5
60Feb-2362.5
61Feb-2362.5
62Feb-2362.5
63Feb-2362.5
64Feb-2362.5
65Feb-2362.5
66Feb-2362.5
67Feb-2362.5
68Feb-2362.5
69Feb-2362.5
70Feb-2362.5
71Feb-2362.5
72Feb-2362.5
73Feb-2362.5
74Feb-2362.5
75Feb-2362.5
76Feb-2362.5
77Feb-2362.5
78Feb-2362.5
79Feb-2362.5
80Feb-2362.5
81Feb-2362.5
82Feb-2362.5
83Feb-2362.5
84Feb-2362.5
85Feb-2362.5
86Feb-2362.5
87Feb-2362.5
88Feb-2362.5
89Feb-2362.5
90Feb-2362.5
91Feb-2362.5
92Feb-2362.19561688
93Feb-2361.02420307
94Feb-2360.1229128
95Feb-2359.79437229
96Feb-2359.79437229
97Feb-2357.98498377
98Feb-2357.86178108
99Feb-2356.25
100Feb-2356.25
101Feb-2354.38311688
102Feb-2354.38311688
103Feb-2354.38311688
104Feb-2350
105Feb-2350
106Feb-2350
107Feb-2350
108Feb-2348.4375
109Feb-2346.26623377
110Feb-2346.26623377
111Feb-2346.26623377
112Feb-2344.53125
113Feb-2342.79349911
114Feb-2338.88724911
115Feb-2336.12012987
116Feb-2334.41558442
117Feb-2330.03246753
118Feb-2330.03246753
119Feb-2330
120Feb-2330
121Feb-2328.90625
122Feb-2325
123Feb-2325
124Feb-2325
125Feb-2325
126Feb-2325
127Feb-2325
Sheet1
Cell Formulas
RangeFormula
D2D2=LET(m,A:A,s,B:B,f,FILTER(s,(m>=D1)*(m<=EOMONTH(D1,0))),IFNA(AVERAGE(DROP(f,MATCH(QUARTILE.INC(f,1),f,0)-1)),AVERAGE(DROP(f,MATCH(QUARTILE.INC(f,1),f,-1)))))
E4E4=QUARTILE.INC(B2:B127,1)
E6:E7E6=AVERAGE(B95:B127)
Named Ranges
NameRefers ToCells
_FilterDatabase=Sheet1!$A$1:$B$127D2
 
Upvote 0
Thanks Fluff. I amended the formula as I was getting #N/A error for few months. With the below formula, I'm getting correct results from Sep-20 onwards but for the month of Feb-23 the result isn't matching. Couldn't figure out the reason for the same. Please support.

Book9
ABCDEFG
1MonthOverall ScoreFeb-23
2Feb-2393.7541.70** Score should be 42.24
3Feb-2393.75
4Feb-2393.75Quartile-1 resut:59.79437
5Feb-2393.75Starting Cell ReferenceB95
6Feb-2393.75Avg. Req. for 33 rows42.24
7Feb-2393.75Avg. Req. for 32 rows41.70
8Feb-2393.75
9Feb-2393.75
10Feb-2393.75
11Feb-2393.75
12Feb-2393.75
13Feb-2391.04437229
14Feb-2389.84375
15Feb-2389.84375
16Feb-2389.84375
17Feb-2389.11178108
18Feb-2385.9375
19Feb-2385.9375
20Feb-2385.9375
21Feb-2382.03125
22Feb-2382.03125
23Feb-2382.03125
24Feb-2380.35714286
25Feb-2378.125
26Feb-2378.125
27Feb-2378.125
28Feb-2377.51623377
29Feb-2377.51623377
30Feb-2377.51623377
31Feb-2375.94358766
32Feb-2374.21875
33Feb-2374.21875
34Feb-2374.21875
35Feb-2371.875
36Feb-2371.42857143
37Feb-2370.3125
38Feb-2370.3125
39Feb-2366.40625
40Feb-2366.40625
41Feb-2366.40625
42Feb-2366.40625
43Feb-2365.79748377
44Feb-2362.5
45Feb-2362.5
46Feb-2362.5
47Feb-2362.5
48Feb-2362.5
49Feb-2362.5
50Feb-2362.5
51Feb-2362.5
52Feb-2362.5
53Feb-2362.5
54Feb-2362.5
55Feb-2362.5
56Feb-2362.5
57Feb-2362.5
58Feb-2362.5
59Feb-2362.5
60Feb-2362.5
61Feb-2362.5
62Feb-2362.5
63Feb-2362.5
64Feb-2362.5
65Feb-2362.5
66Feb-2362.5
67Feb-2362.5
68Feb-2362.5
69Feb-2362.5
70Feb-2362.5
71Feb-2362.5
72Feb-2362.5
73Feb-2362.5
74Feb-2362.5
75Feb-2362.5
76Feb-2362.5
77Feb-2362.5
78Feb-2362.5
79Feb-2362.5
80Feb-2362.5
81Feb-2362.5
82Feb-2362.5
83Feb-2362.5
84Feb-2362.5
85Feb-2362.5
86Feb-2362.5
87Feb-2362.5
88Feb-2362.5
89Feb-2362.5
90Feb-2362.5
91Feb-2362.5
92Feb-2362.19561688
93Feb-2361.02420307
94Feb-2360.1229128
95Feb-2359.79437229
96Feb-2359.79437229
97Feb-2357.98498377
98Feb-2357.86178108
99Feb-2356.25
100Feb-2356.25
101Feb-2354.38311688
102Feb-2354.38311688
103Feb-2354.38311688
104Feb-2350
105Feb-2350
106Feb-2350
107Feb-2350
108Feb-2348.4375
109Feb-2346.26623377
110Feb-2346.26623377
111Feb-2346.26623377
112Feb-2344.53125
113Feb-2342.79349911
114Feb-2338.88724911
115Feb-2336.12012987
116Feb-2334.41558442
117Feb-2330.03246753
118Feb-2330.03246753
119Feb-2330
120Feb-2330
121Feb-2328.90625
122Feb-2325
123Feb-2325
124Feb-2325
125Feb-2325
126Feb-2325
127Feb-2325
Sheet1
Cell Formulas
RangeFormula
D2D2=LET(m,A:A,s,B:B,f,FILTER(s,(m>=D1)*(m<=EOMONTH(D1,0))),IFNA(AVERAGE(DROP(f,MATCH(QUARTILE.INC(f,1),f,0)-1)),AVERAGE(DROP(f,MATCH(QUARTILE.INC(f,1),f,-1)))))
E4E4=QUARTILE.INC(B2:B127,1)
E6:E7E6=AVERAGE(B95:B127)
Named Ranges
NameRefers ToCells
_FilterDatabase=Sheet1!$A$1:$B$127D2
I used the below formula in my database, in which I got the incorret result for Feb-23 but for all other months got right results.

=LET(m,NV[Month],s,NV[Overall Score],f,FILTER(s,(m>=R30)*(m<=EOMONTH(R30,0))),IFNA(AVERAGE(DROP(f,MATCH(QUARTILE.INC(f,1),f,0)-1)),AVERAGE(DROP(f,MATCH(QUARTILE.INC(f,1),f,-1)))))
 
Upvote 0
When I copy the data you posted I get 42.24. Check that you don't have any further rows for Feb 23
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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