如何將EXCEL資料表裡面的資料逆時針旋轉90度

samayinlike發表於2020-12-04

Sub Rotate_90_Degrees_Counterclockwise()
'逆時針旋轉90度
’ 巨集5 巨集
Dim ARR()
ARR = Application.WorksheetFunction.Transpose(Worksheets(“WrongMAP原始檔”).UsedRange)
'ARR = Application.WorksheetFunction.Transpose(ARR)
Sheets.Add After:=ActiveSheet
For i = LBound(ARR) To UBound(ARR)

For j = LBound(ARR, 2) To UBound(ARR, 2)
    Cells(i, UBound(ARR, 2) - j + 1) = ARR(i, j)
Next

Next
End Sub

相關文章