将列范围转置为行,然后在该行下方重复
Transpose range of columns into rows, then repeat below that row
这是我的数据现在的样子:
编辑:我忘了补充一点,我经常需要转置 - 每第 n 列,我需要再次开始转置。在这个例子中,我每 2 列都有它,但我的实际数据集是每 3 列。
Username Product 1 Product 2 Service 1 Service 2
Person 1 Name1 Name2 Name3 Name4
Person 2 Name5 Name6 Name7 Name8
这就是我希望我的数据的样子:
Username Product Service (What I've come up with, formula-wise, for PRODUCT:)
Person 1 Name1 Name 3 OFFSET([Person 1],0,ROW($A))
Person 1 Name2 Name 4 OFFSET([Person 1],0,ROW($A)+1)
Person 2 Name5 Name 7 OFFSET([Person 2],0,ROW($A))
Person 2 Name6 Name 8 OFFSET([Person 2],0,ROW($A)+1)
我不知道如何使用 VBA 或宏,而且有很多数据,所以我对手动转置也不感兴趣。有没有可以在这里工作的公式?
我一直在疯狂地试图弄清楚 OFFSET 是如何工作的。现在,我在上面的 table 中看到了一个公式。 [Person 1] 和 [Person 2] 区域内部实际上是一个 INDEX-MATCH,因此 OFFSET 从正确的行开始并在移动到下一个人时更新。然后我一直在手动复制和粘贴下一组两行。如果这听起来过于复杂,那就更糟了 - 它不起作用。
我将非常感谢任何可以帮助我的 OFFSET 专家,或者如果之前已经回答过这个问题,请为我指明正确的方向。我一直在四处寻找,但不确定我是否使用了正确的搜索词。
把这两个公式放在F2:G2,
=INDEX(A:A,INT((ROW(1:1)-1)/3)+2)
=INDEX(B:D, INT((ROW(1:1)-1)/3)+2,MOD(ROW(1:1)-1, 3)+1)
往下填。
A. This can be done simply by selecting the rows and columns.
B. Copy the selected cells either by right clicking the selection.
C. Select the first cell of the destination range into which you want to copy the transposed data.
D. Paste the copied data using Paste Special, go to Transpose feature.
E. You can find this by right clicking the destination cell and choose Paste Special from the context menu, then select Transpose.
This should work for you. Let me know how it went.
这是我的数据现在的样子:
编辑:我忘了补充一点,我经常需要转置 - 每第 n 列,我需要再次开始转置。在这个例子中,我每 2 列都有它,但我的实际数据集是每 3 列。
Username Product 1 Product 2 Service 1 Service 2
Person 1 Name1 Name2 Name3 Name4
Person 2 Name5 Name6 Name7 Name8
这就是我希望我的数据的样子:
Username Product Service (What I've come up with, formula-wise, for PRODUCT:)
Person 1 Name1 Name 3 OFFSET([Person 1],0,ROW($A))
Person 1 Name2 Name 4 OFFSET([Person 1],0,ROW($A)+1)
Person 2 Name5 Name 7 OFFSET([Person 2],0,ROW($A))
Person 2 Name6 Name 8 OFFSET([Person 2],0,ROW($A)+1)
我不知道如何使用 VBA 或宏,而且有很多数据,所以我对手动转置也不感兴趣。有没有可以在这里工作的公式?
我一直在疯狂地试图弄清楚 OFFSET 是如何工作的。现在,我在上面的 table 中看到了一个公式。 [Person 1] 和 [Person 2] 区域内部实际上是一个 INDEX-MATCH,因此 OFFSET 从正确的行开始并在移动到下一个人时更新。然后我一直在手动复制和粘贴下一组两行。如果这听起来过于复杂,那就更糟了 - 它不起作用。
我将非常感谢任何可以帮助我的 OFFSET 专家,或者如果之前已经回答过这个问题,请为我指明正确的方向。我一直在四处寻找,但不确定我是否使用了正确的搜索词。
把这两个公式放在F2:G2,
=INDEX(A:A,INT((ROW(1:1)-1)/3)+2)
=INDEX(B:D, INT((ROW(1:1)-1)/3)+2,MOD(ROW(1:1)-1, 3)+1)
往下填。
A. This can be done simply by selecting the rows and columns.
B. Copy the selected cells either by right clicking the selection.
C. Select the first cell of the destination range into which you want to copy the transposed data.
D. Paste the copied data using Paste Special, go to Transpose feature.
E. You can find this by right clicking the destination cell and choose Paste Special from the context menu, then select Transpose.
This should work for you. Let me know how it went.