简体   繁体   English

查找数字总和最高的行名

[英]Find the row name with the highest sum of numbers

In the below spreadsheet, I am trying to find the item with the highest total sales across various hours.在下面的电子表格中,我试图找到不同时间总销售额最高的商品。

I would like to easily extract the highest and lowest selling item names as well as their corresponding total sales.我想轻松提取最高和最低销售项目名称以及它们相应的总销售额。 I need to be able to do this without creating a helper column as I cannot edit the table.我需要能够在不创建帮助列的情况下执行此操作,因为我无法编辑表格。

I know there's probably an easy way to do this but for the life of me I cannot figure it out!我知道可能有一种简单的方法可以做到这一点,但对于我的生活,我无法弄清楚!

Link to Sheet 链接到工作表

B12: B12:

=INDEX(SORT(SPLIT(FLATTEN(B2:G10&"×"&A2:A10&"×"&B1:G1), "×"), 1, 0), 1, 2)

B13: B13:

=INDEX(SORT(SPLIT(FLATTEN(B2:G10&"×"&A2:A10&"×"&B1:G1), "×"), 1, 0), 1, 1)

B14: B14:

=INDEX(SORT(SPLIT(FLATTEN(B2:G10&"×"&A2:A10&"×"&B1:G1), "×"), 1, 1), 1, 2)

B15: B15:

=INDEX(SORT(SPLIT(FLATTEN(B2:G10&"×"&A2:A10&"×"&B1:G1), "×"), 1, 1), 1, 1)

在此处输入图像描述

** edit: use player0's for the overall min and max. ** 编辑:使用 player0 的整体最小值和最大值。

Check this demo sheet 检查此演示表

To get the highest or lowest by time slot (put this in I5),要按时隙获得最高或最低(将其放在 I5 中),

=ARRAYFORMULA(
  IFERROR(
   VLOOKUP(
    TRANSPOSE(B1:G1),
    SORT(
     SPLIT(
      FLATTEN(B1:G1&"|"&A2:A&"|"&B2:G),
      "|"),
     3,FALSE),
    {1,2,3},FALSE)))

Then to align the lowest per timeslot with that, put this in M5然后将每个时隙的最低值与之对齐,将其放入 M5

=ARRAYFORMULA(
  IF(ISBLANK(I5:I),,
   IFERROR(
    VLOOKUP(
     I5:I,
     SORT(
      SPLIT(
       FLATTEN(B1:G1&"|"&A2:A&"|"&B2:G),
       "|"),
      3,FALSE),
     {2,3},FALSE))))

If you also wanted conditional formatting for the daily high and low, use a range of B2:G with如果您还想要每日高点和低点的条件格式,请使用 B2:G 范围

=AND(LEN(B2),MIN($B2:$G2)=B2)

If you really want to have these formulas below the table, change如果您真的想将这些公式放在表格下方,请更改

FLATTEN(B1:G1&"|"&A2:A&"|"&B2:G),

to

FLATTEN(B1:G1&"|"&A2:A10&"|"&B2:G10),

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

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