Formula to get average of 3 lowest numbers in a changing range.

chrisj2812

New Member
Joined
Apr 5, 2020
Messages
12
Office Version
  1. 2019
Hi All,

I've spent far too long trying to figure out this so any help from the group is really appreciated.

I need the average of the lowest 3 numbers in the changing range (index3) to appear in the end column.

For example, the average for range Dundalk 44613 is (0.01 +0.03 + 0.05) / 3 = 0.03

Many thanks in advance

Chris
 

Attachments

  • Screenshot 2022-02-23 102315.jpg
    Screenshot 2022-02-23 102315.jpg
    111.3 KB · Views: 11

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Map1
ABC
1idnumbersmall3
2a0,0544890,118203
3a0,836725 
4a0,337003 
5a0,964188 
6a0,999119 
7a0,479222 
8a0,869039 
9a0,100095 
10a0,894006 
11a0,798181 
12a0,200026 
13a0,417769 
14a0,856677 
15a0,222464 
16a0,756726 
17a0,847696 
18a0,50534 
19b0,7838340,105555
20b0,280079 
21b0,030635 
22b0,969359 
23b0,419816 
24b0,528728 
25b0,19785 
26b0,504649 
27b0,11547 
28b0,177431 
29b0,643351 
30b0,985646 
31b0,810614 
32b0,432601 
33b0,315325 
34b0,17056 
35b0,282065 
36c0,697740,395072
37c0,088251 
38c0,87888 
39c0,781585 
40c0,399225 
41c0,871271 
42c0,88622 
Blad1
Cell Formulas
RangeFormula
C2:C42C2=IF(COUNTIF($A$2:A2,[@id])=1,AVERAGE(AGGREGATE(15,6,[number]/([id]=[@id]),{1;2;3})),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B42Expression=B2<=AGGREGAAT(15;6;$B$2:$B$42/($A$2:$A$42=A2);3)textNO
 
Upvote 0
Solution
Data range is A2:F30

ARRAY formula in 2nd row then copied down.

=IF(COUNTIF($A$2:$A2,$A2)=1,AVERAGEIFS($F$2:$F$30,$A$2:$A$30,$A2,$F$2:$F$30,"<="&SMALL(IF($A$2:$A$30=$A2,$F$2:$F$30,""),3)))
To enter ARRAY formula
Copy and paste the formula in cell
Press F2
Press Ctrl+Shift+Enter together
Excel covers the formula with {}.
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

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