简体   繁体   English

Excel - 找到最高的多单元格总数

[英]Excel - Find highest MULTI-cell Total

2003-2004 是最大的两年/单元格延伸----如何编码?

Hello!你好!

Is it possible to have Excel find the largest two, three or four cell total within its data?是否可以让 Excel 在其数据中找到最大的两个、三个或四个单元格总数? For example, dates are entered as 2000, 2001, 2002, etc in column A and in column B, there's another figure, HRs.例如,日期在 A 列和 B 列中输入为 2000、2001、2002 等,还有另一个数字 HRs。 I have my document sorted by dates (columnA) and now want to see the most HRs hit over two seasons.我的文档按日期排序(A 列),现在想查看两个赛季中命中率最高的 HR。 This seems very useful and utilized in data but still under-realized.这在数据中似乎非常有用并被利用,但仍未实现。

-Most touchdowns over a two-season stretch. - 两个赛季中的大多数达阵。 (most touchdowns over a THREE season stretch etc.) -Highest-grossing 3-month stretch. (大多数达阵超过三个赛季等) - 最高总收入的 3 个月。 -Rainiest two days ever -Most speeding tickets issued in two days. - 有史以来最多雨的两天 - 两天内发出的超速罚单最多。 -Largest two-day Jeopardy winnings. - 最大的两天危险奖金。 -ETC -等等

Can I search through an excel document and see the largest 2-day rainfall as described?我可以搜索 Excel 文档并查看所描述的最大 2 天降雨量吗? Something similar to "Find All" in excel but for consecutive cells, though, that doesn't find largest I suppose.类似于excel中的“查找全部”的东西,但是对于连续的单元格,我认为没有找到最大的。 It'd be cool, if you could drag a range, say 3 cells tall, within a larger range, and Excel could find that largest totals in that larger range.如果您可以在更大的范围内拖动一个范围(例如 3 个单元格高),并且 Excel 可以在该更大范围内找到最大的总数,那就太酷了。

I doubt this is possible---but surely there is a way data scientists or just newspapers can organize data to find the largest total over a certain stretch?我怀疑这是可能的——但肯定有一种方法数据科学家或只是报纸可以组织数据以找到特定时间段内最大的总数? (most HR over a 5-season stretch) How could I do this? (大多数 HR 超过 5 个赛季)我怎么能做到这一点? Maybe this requires a program for SQL or something?也许这需要一个 SQL 程序或其他东西? Thank you.谢谢你。

https://www.exceltip.com/summing/sum-the-largest-two-numbers-in-range-in-microsoft-excel.html This seems close, but just finds the two largest figures----not the two largest consecutive figures, which is what I'm looking for. https://www.exceltip.com/summing/sum-the-largest-two-numbers-in-range-in-microsoft-excel.html这看起来很接近,但只是找到了两个最大的数字——不是两个最大的连续数字,这就是我要找的。

Using offset ranges:使用偏移范围:

=MAX(B2:B12+B3:B13)

or subtotal/offset combo:或小计/抵消组合:

=MAX(SUBTOTAL(9,OFFSET(B1,ROW(B1:B11),0,2,1)))

(the first one gets cumbersome when extended to 3,4,5... adjacent cells) (第一个扩展到 3,4,5... 相邻单元格时变得很麻烦)

must be entered as array formulas using Ctrl Shift Enter必须使用Ctrl Shift Enter作为数组公式输入

在此处输入图片说明

EDIT编辑

If you wanted to find the first, second etc. largest pair you could use Large instead of Max:如果您想找到第一个、第二个等最大的对,您可以使用 Large 而不是 Max:

=LARGE(B$2:B$12+B$3:B$13,ROW()-1)

or或者

=LARGE(SUBTOTAL(9,OFFSET(B$1,ROW(B$1:B$11),0,2,1)),ROW()-1)

and then to find the year, use Index/match:然后找到年份,使用索引/匹配:

=INDEX(A$2:A$12,MATCH(F2,SUBTOTAL(9,OFFSET(B$1,ROW(B$1:B$11),0,2,1)),0))

The only drawback of this is that if there were two pairs giving the same maximum of 84 say, the index/match would still match the year of the first one.唯一的缺点是,如果有两对给出相同的最大值 84 说,索引/匹配仍将匹配第一个的年份。 This can be addressed but maybe that is enough for now.这可以解决,但也许现在就足够了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM