請你將內容複製到Sheet1的A列中,按按鈕執行即可完成轉換。Sub 按鈕1_Click()Dim i As Long, j As Long, k As IntegerLastRow = Cells(Rows.Count, 1).End(xlUp).Rowi = 1j = 1Do While i <= LastRow For k = 1 To 6 Sheets("Sheet1").Select Range(Cells(i, 1), Cells(i + 44, 1)).Select Selection.Copy Sheets("Sheet2").Select Cells(j, k).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False i = i + 45 Next j = j + 45LoopCells(1, 1).SelectEnd Sub
請你將內容複製到Sheet1的A列中,按按鈕執行即可完成轉換。Sub 按鈕1_Click()Dim i As Long, j As Long, k As IntegerLastRow = Cells(Rows.Count, 1).End(xlUp).Rowi = 1j = 1Do While i <= LastRow For k = 1 To 6 Sheets("Sheet1").Select Range(Cells(i, 1), Cells(i + 44, 1)).Select Selection.Copy Sheets("Sheet2").Select Cells(j, k).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False i = i + 45 Next j = j + 45LoopCells(1, 1).SelectEnd Sub