|
楼主 |
发表于 2018-8-7 19:16
|
显示全部楼层
Sub Macro1()
'
' Macro1 Macro
' 宏由 Administrator 录制,时间: 2018/08/06
'
'
Range("P2:P4").Select
Selection.Copy
Sheets("Sheet2").Activate
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=True
Sheets("三转置成一").Activate
Range("Q2:Q4").Select
Selection.Copy
Sheets("Sheet2").Activate
Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=True
Application.WindowState = xlMinimized
Application.WindowState = xlNormal
Sheets("三转置成一").Activate
Range("R2:R4").Select
Selection.Copy
Sheets("Sheet2").Activate
Range("G1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=True
Sheets("三转置成一").Activate
Range("S2:S4").Select
Selection.Copy
Sheets("Sheet2").Activate
Range("J1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=True
Sheets("三转置成一").Activate
Range("P5:P7").Select
Selection.Copy
Sheets("Sheet2").Activate
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=True
Sheets("三转置成一").Activate
Range("Q5:Q7").Select
End Sub
我录制的操作思路步骤,固定每3个单元格(比如B2B3B4转换成b2c2d2),然后到c2c3c4转换成c2d2e2,d2d3d转换成4d2e2f2.....每3行多列转换成一行为一个周期,再向下3行依次操作。请大侠帮助! |
|