如何旋转Excel数据
这是一个我一直想知道的普遍问题。有好几次我需要在 Excel 中旋转数据,例如:
开始于:
| A | B | C |
----------------------
1 | ABC | DEF | GHI |
----------------------
2 | omg | lol | xyz |
----------------------
3 | | | |
----------------------
转换为:
| A | B | C |
----------------------
1 | ABC | omg | |
----------------------
2 | DEF | lol | |
----------------------
3 | GHI | xyz | |
----------------------
我从未找到合理的方法来执行此操作。我现在能想到的解决方案是:
- 编写一个宏(恶心)
- 手动复制/粘贴(恶心)
- 也许有一些数据透视表魔法? (我怀疑这是可能的)
- 使用
INDEX
的聪明公式
是否还有其他解决方案,也许是一些隐藏的内置功能?
This is a general question that just popped into my head that I have always wondered. There have been several times when I've needed to rotate data in Excel, for example:
Starting with:
| A | B | C |
----------------------
1 | ABC | DEF | GHI |
----------------------
2 | omg | lol | xyz |
----------------------
3 | | | |
----------------------
transform into:
| A | B | C |
----------------------
1 | ABC | omg | |
----------------------
2 | DEF | lol | |
----------------------
3 | GHI | xyz | |
----------------------
I have never found a reasonable way to do this. Solutions I can think of right now are:
- Write a macro (yuck)
- Manually copy / paste (yuck)
- Maybe some pivot table magic? (i doubt this would be possible)
- Clever formulas using
INDEX
Are there other solutions, maybe some hidden built-in feature?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 TRANSPOSE() 函数
Use of the TRANSPOSE() function
调换行和列?
请参阅:
http://office.microsoft.com/en-us/excel-help/rotate-data-by-converting-columns-to-rows-or-vice-versa-HP005203138.aspx
Transposing rows and columns?
See:
http://office.microsoft.com/en-us/excel-help/rotate-data-by-converting-columns-to-rows-or-vice-versa-HP005203138.aspx
从数据构建数据透视表,然后您可以转置并执行更多操作(过滤、分组等)
Construct a pivot table from the data then you can transpose and do a lot more besides (filter, group etc)