Note: You may need to change the (ROW()-6) depending on the ROW() from where you are entering the formula for transformation. Example, like if you start from cell or row 3 then it will be (ROW()-3) so on so forth accordingly as per your suit.
• If you are using MS365 and when writing if you have enabled the Office Insiders Beta Channel Version then, using LAMBDA()HSTACK()TEXTSPLIT()DROP()TAKE()TOCOL() & TEXTJOIN() can achieve it as well.
• Also Note : You can use a custom, reusable formula with a friendly name by placing the above formula in the Name Manager - with Define Name as UNPIVOT.
So from Formulas tab, Click on Define Name --> Enter the name as UNPIVOT and place the above formula as in refers to
I'm missing something here. For a 3x3 array, both formulas for column B work. But if I change it to a 4x6 array, the values found for column B start over after the first four values. The formula I'm using is:
= index($ b $ 1:$ d $ 1,mod((Row(Row()-6-六Quotient(Row(Row()-1; Counta)($ B $ 1:$ d $ D $ 1 )*counta($ b $ 1:$ d $ 1)),行($ a $ 2:$ a $ 4))+1)
This is a great piece of Excel engineering! There is a small mistake in the formula of cell B6 due to the fact that the example is a 3x3 array. As such, it goes unnoticed in this example, but when your array is NxM it will pop up as #REF! error in column B.
发布评论
评论(3)
您可以根据您的 excel版本 尝试以下任何一种方法。
•如果您正在使用 Excel 2010/2013/2016/2019/2021/MS365 ,那么,此方法适用于
单元
a6
在单元格中使用的公式
中 使用的所有公式
c6
注意:您可能需要更改
(row() - 6)
取决于row> row()
从你的地方正在进入转换公式。例如,就像您从单元格或第3行开始一样,它将是(Row(Row() - 3)
,因此按照您的西装相应地。•如果您使用的是 MS365 ,并且在写作时,如果启用了 Office Insiders Beta Channel版本,则使用
lambda()
hstack ()
textsplit()
drop()
take> take()
tocol()
&textjoin()
也可以实现它。•也要注意:您可以使用 custom , 可重复使用 公式em> 友好名称 通过将上述公式放置在名称管理器 - 带有 定义名称为
unpivot
>。因此,从公式选项卡中,单击定义名称 - >输入名称为 undivot ,并将上述公式如中的内容所指,请参考
语法是
数组为
a1:d4
关闭注: 您也可以使用 Power查询来实现上述转换。
You may try any one of the following approaches, as per your Excel version.
• If you are using Excel 2010/2013/2016/2019/2021/MS365, then this one works for all
Formula used in cell
A6
Formula used in cell
B6
Formula used in cell
C6
Note: You may need to change the
(ROW()-6)
depending on theROW()
from where you are entering the formula for transformation. Example, like if you start from cell or row 3 then it will be(ROW()-3)
so on so forth accordingly as per your suit.• If you are using MS365 and when writing if you have enabled the Office Insiders Beta Channel Version then, using
LAMBDA()
HSTACK()
TEXTSPLIT()
DROP()
TAKE()
TOCOL()
&TEXTJOIN()
can achieve it as well.• Also Note : You can use a custom, reusable formula with a friendly name by placing the above formula in the Name Manager - with Define Name as
UNPIVOT
.So from Formulas tab, Click on Define Name --> Enter the name as UNPIVOT and place the above formula as in refers to
The syntax is
Where array is
A1:D4
Closing Note: You can also achieve the above transformation using Power Query as well.
我在这里缺少一些东西。对于3x3阵列,两个用于B列工作的公式。但是,如果我将其更改为4x6数组,则在前四个值之后,B列找到的值开始。我正在使用的公式为:
= index($ b $ 1:$ g $ 1,mod((Row(Row() - 5-Quortient(Row(Row()-1,Counta($ B $ 1:$ G $ 1))) *counta($ b $ 1:$ g $ 1)),行($ a $ 2:$ a $ 5))+1)
好的,回答我的问题,这个公式似乎是工作:
I'm missing something here. For a 3x3 array, both formulas for column B work. But if I change it to a 4x6 array, the values found for column B start over after the first four values. The formula I'm using is:
=INDEX($B$1:$G$1,MOD((ROW()-5-QUOTIENT(ROW()-1,COUNTA($B$1:$G$1))*COUNTA($B$1:$G$1)),ROWS($A$2:$A$5))+1)
OK, to answer my question, this formula seems to work:
这是一件很棒的Excel工程!由于示例是一个3x3阵列,因此在单元B6的公式中存在一个小错误。因此,它在此示例中没有注意到,但是当您的数组为NXM时,它将弹出为#REF!列B中的错误。
正确公式应为:
= index($ b $ 1:$ d $ 1,mod((Row(Row()-6-六Quotient(Row(Row()-1; Counta)($ B $ 1:$ d $ D $ 1 )*counta($ b $ 1:$ d $ 1)),行($ a $ 2:$ a $ 4))+1)
This is a great piece of Excel engineering! There is a small mistake in the formula of cell B6 due to the fact that the example is a 3x3 array. As such, it goes unnoticed in this example, but when your array is NxM it will pop up as #REF! error in column B.
Correct formula should be:
=INDEX($B$1:$D$1,MOD((ROW()-6-QUOTIENT(ROW()-1;COUNTA($B$1:$D$1))*COUNTA($B$1:$D$1)),ROWS($A$2:$A$4))+1)