“Quick Excel Formula – 重新排序数组”

huangapple go评论45阅读模式
英文:

Quick Excel Formula - Reorder Array

问题

I require a reorder formula without adding any extra cells on the sheet (≠helpers).

I'd like to reorder the 10 vertical cells located in AV63-72 currently in numerical order (2.94-3.35) = SOURCE, in the 10-cells selected array just below (=RESULTs displayed as it should be), according to the positions & values in the 10-cell array just left of the selected=INSTRUCTIONS column.

The vertical positions in all three arrays correspond vertically as static 1-10, but the values for the positions in the INSTRUCTION change as the sheet expands.

So, the instructions for the "2.94" in AV63 being in the 1st position (1.10) would be to write in turn in the 5th position in the RESULT array, where the formulas would be.

Can this be done just leveraging on the data shown, without adding any extra helper arrays on the sheet?

英文:

“Quick Excel Formula – 重新排序数组”

I require a reorder formula without adding any extra cells on the sheet (≠helpers).

I'd like to reorder the 10 vertical cells located in AV63-72 currently in numerical order (2.94-3.35) = SOURCE, in the 10-cells selected array just below (=RESULTs displayed as it should be), according to the positions & values in the 10-cell array just left of the selected=INSTRUCTIONS column.

The vertical positions in all three arrays correspond vertically as static 1-10, but the values for the positions in the INSTRUCTION change as the sheet expands.

So, the instructions for the "2.94" in AV63 being in the 1st position (1.10) would be to write in turn in the 5th position in the RESULT array, where the formulas would be.

Can this be done just leveraging on the data shown, without adding any extra helper arrays on the sheet?

答案1

得分: 1

Sure, here's the translation of the provided content:

尝试这个:

=INDEX($AV$63:$AV$72,MATCH(ROW(AV73)-ROW($AV$73)+1,$AU$73:$AU$82,0))

公式演化

1) 任务声明

重新排列列表

2) 分解任务声明

=INDEX(数据列表, 给定行的索引)

3) 指定数据列表

=INDEX($AV$63:$AV$72, 给定行的索引)

4) 分解给定行的索引

=INDEX($AV$63:$AV$72,MATCH(相对行号, 指令列表, 精确结果))

5) 指定精确结果

=INDEX($AV$63:$AV$72,MATCH(相对行号, 指令列表,0))

6) 指定指令列表

=INDEX($AV$63:$AV$72,MATCH(相对行号,$AU$73:$AU$82,0))

7) 分解相对行号

=INDEX($AV$63:$AV$72,MATCH(这一行号 - 结果列表的第一行 + 1 ,$AU$73:$AU$82,0))

8) 指定结果列表的第一行

=INDEX($AV$63:$AV$72,MATCH(这一行号 - ROW($AV$73)+1,$AU$73:$AU$82,0))

9) 指定这一行号

=INDEX($AV$63:$AV$72,MATCH(ROW(AV73)-ROW($AV$73)+1,$AU$73:$AU$82,0))

公式展开

=INDEX(从中选择
$AV$63:$AV$72, 数据列表
MATCH( 具有索引等于行值的元素
ROW( 行
AV73 此行的
)
- 减去
ROW( 行
$AV$73 结果列表的初始行
)
+1, 加一
$AU$73:$AU$82, 在指令列表中
0 精度
)
)

公式注释

=INDEX($AV$63:$AV$72,MATCH(ROW(AV73)-ROW($AV$73)+1,$AU$73:$AU$82,0))
| A | B | C | D | E | F| G |H|

我们需要搜索指令列表(部分G)中的每个数字,从1到10。我们使用匹配函数(部分C)来在指令列表(部分G)中进行精确(部分H)搜索。我们的结果将列在一列中,因此每个结果将存储在该列的一行中。由于我们需要从1到10的数字系列,我们获取给定单元格的行号(部分D),减去结果列表的起始单元格的行号(部分E),然后加1(部分F)。请注意给定单元格(部分D)的相对引用和结果列表起始单元格(部分E)的绝对引用;这些引用将允许我们拖动单元格,轻松更改相对引用而保持绝对引用不变。这将使我们得到结果列表的第一个单元格为1,第二个单元格为2,第三个单元格为3...以此类推。借助此结果,我们的匹配函数(部分C)将找到与结果列表的给定行相等的指令列表的行号。我们可以使用此结果来使用索引函数(部分A)搜索数据列表(部分B)。

整个结果列表最终将具有以下公式:

=INDEX($AV$63:$AV$72,MATCH(ROW(AV73)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV74)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV75)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV76)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV77)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV78)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV79)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV80)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV81)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV82)-ROW($AV$73)+1,$AU$73:$AU$82,0))

(Note: The translation is provided without the code parts as requested.)

英文:

Try this:

=INDEX($AV$63:$AV$72,MATCH(ROW(AV73)-ROW($AV$73)+1,$AU$73:$AU$82,0))

FORMULA EVOLUTION

1) Mission statement

REORDER THE LIST

2) Breaking up the mission statement

=INDEX(THE DATA LIST, THE INDEX FOR THE GIVEN ROW)

3) Specifying THE DATA LIST

=INDEX($AV$63:$AV$72, THE INDEX FOR THE GIVEN ROW)

4) Breaking up THE INDEX FOR THE GIVEN ROW

=INDEX($AV$63:$AV$72,MATCH(THE RELATIVE ROW NUMBER, THE INSTRUCTION LIST, PRECISE RESULT))

5) Specifying PRECISE RESULT

=INDEX($AV$63:$AV$72,MATCH(THE RELATIVE ROW NUMBER, THE INSTRUCTION LIST,0))

6) Specifying THE INSTRUCTION LIST

=INDEX($AV$63:$AV$72,MATCH(THE RELATIVE ROW NUMBER,$AU$73:$AU$82,0))

7) Breaking up THE RELATIVE ROW NUMBER

=INDEX($AV$63:$AV$72,MATCH( THIS ROW NUMBER - THE FIRST ROW OF THE RESULT LIST + 1 ,$AU$73:$AU$82,0))

8) Specifying THE FIRST ROW OF THE RESULT LIST

=INDEX($AV$63:$AV$72,MATCH( THIS ROW NUMBER - ROW($AV$73)+1,$AU$73:$AU$82,0))

9) Specifying THIS ROW NUMBER

=INDEX($AV$63:$AV$72,MATCH(ROW(AV73)-ROW($AV$73)+1,$AU$73:$AU$82,0))

FORMULA EXPLODED

=INDEX(                          Pick from
      $AV$63:$AV$72,             the data list
      MATCH(                     the element with index equal to the row whose value is equal
            ROW(                 to the row
                AV73             of this row
               )
            -                    minus
            ROW(                 the row
                $AV$73           of the initial row of the result list
               )
            +1,                  plus one
            $AU$73:$AU$82,       among the instruction list
            0                    with precision
           )
      )

FORMULA NOTED

=INDEX($AV$63:$AV$72,MATCH(ROW(AV73)-ROW($AV$73)+1,$AU$73:$AU$82,0))
|  A  |      B      |  C  |    D    |    E     | F|      G      |H|

We need to search the list of instruction (part G) for each number from 1 to 10. We use a match function (part C) to search the list of instruction (part G) with precision (part H). Our results will be listed in a column, therefore each result will be stored in a row of said column. Since we need the series of number from 1 to 10, we take the row number for the given cell (part D) minus the row number for the starting cell of the results list (part E) plus 1 (part F). Note the relative reference of the given cell (part D) and the absolute reference of the starting cell of the results list (part E); said references will allow us to drag the cell down to easily change the relative references while keeping the absolute one. This will return us a 1 for the first cell of the result list, a 2 for the second cell of the result list, a 3 for the third cell... and so on. Thanks to this, our match function (part C) will find at what row of the instruction list is stored the number equal to the given row of the result list. We can use this result to search the data list (part B) using a index function (part A).

The whole list of results will ultimately have these formulas:

=INDEX($AV$63:$AV$72,MATCH(ROW(AV73)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV74)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV75)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV76)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV77)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV78)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV79)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV80)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV81)-ROW($AV$73)+1,$AU$73:$AU$82,0))
=INDEX($AV$63:$AV$72,MATCH(ROW(AV82)-ROW($AV$73)+1,$AU$73:$AU$82,0))

huangapple
  • 本文由 发表于 2023年5月15日 03:45:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76249391.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定