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
| Option Explicit
Option Base 1
Sub recomposer_sur1colonne()
Dim lig As Long, col As Byte, derlig As Long, index As Long
Dim T_in, T_out
With Sheets("original")
derlig = .Range("A65536").End(xlUp).Row
T_in = .Range("A1:C" & derlig)
ReDim T_out(UBound(T_in) * 3)
index = 1
For lig = 1 To UBound(T_in)
For col = 1 To 3
T_out(index) = T_in(lig, col)
index = index + 1
Next
Next
End With
With Sheets("souhait")
.Columns(1).ClearContents
.Range("A1:A" & UBound(T_out)) = Application.Transpose(T_out)
.Activate
End With
End Sub |
Partager