Forum Discussion
Simon0307
Sep 25, 2023Copper Contributor
Excel - sum largest 5 numbers out of 6
I need to add the 5 largest numbers together from a list of 6. The 6 are not in a consecutive line and there are other numbers in between. The list are on the following rows: D7,D9,D11,D13,D15,D17 ...
- Sep 25, 2023
=SUM(LARGE((D7,D9,D11,D13,D15,D17),{1;2;3;4;5}))or
=LET(φ,(D7,D9,D11,D13,D15,D17),SUM(φ)-MIN(φ))
PeterBartholomew1
Sep 25, 2023Silver Contributor
Since the numbers alternate within a list, WRAPROWS will move the unwanted values to a fresh column. SORT can be set to sort descending by the first column. TAKE selects the first five rows of the first column.
= LET(
filtered, WRAPROWS(list,2),
topfive, TAKE(SORT(filtered,,-1), 5, 1),
SUM(topfive)
)