1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Dim r_cut As Range, r_dest As Range, cl, _
l As Integer, c As Integer, ld As Integer, cd As Integer, couper As String
cl = Application.Calculation
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Set r_cut = Selection
ld = r_cut.Columns.Count
cd = r_cut.Rows.Count
Set r_dest = r_cut.Range(Cells(1, ld + 2), Cells(ld, cd))
couper = r_cut.Cells(1, 1).Address
For c = 1 To ld
For l = 1 To cd
r_cut.Cells(l, c).Cut r_dest.Cells(c, l)
Next
Next
r_dest.CurrentRegion.Cut
Range(couper).Insert
Application.Calculation = cl
Application.ScreenUpdating = True |
Partager