Const PAS = 14
Sub TEST()
Dim vData, i&, j&, j1&, j2, k&, n&, deb
deb = Timer
On Error GoTo FIN
Application.ScreenUpdating = False: Application.Calculation = xlCalculationManual: Application.EnableEvents = False
'lecture des données sources
ThisWorkbook.Save
vData = Range("A1:dh800000").Value2
Me.UsedRange.Clear
'Boucle sur vData et traitement des données (pour exemple)
For j = 1 To UBound(vData, 2)
vData(1, j) = 1 & "_" & j
vData(20, j) = 20 & "_" & j
vData(UBound(vData), j) = 20 & "_" & j
Next j
'Boucle écriture
For j = 1 To UBound(vData, 2) Step PAS
j1 = j: j2 = j1 + PAS - 1
If j2 > UBound(vData, 2) Then j2 = UBound(vData, 2)
ReDim r(1 To UBound(vData), 1 To j2 - j1 + 1)
Application.StatusBar = "colonnes de: " & j1 & " à " & j2
For i = 1 To UBound(vData): For k = j1 To j2
r(i, k - j1 + 1) = vData(i, k)
Next k, i
Cells(1, j1).Resize(UBound(vData), UBound(r, 2)).Value2 = r
Next j
Application.Calculation = xlCalculationAutomatic: Application.EnableEvents = True: Application.StatusBar = False
MsgBox "Durée = " & Format(Timer - deb, "# ##0\ sec."), vbInformation
Exit Sub
FIN:
Application.Calculation = xlCalculationAutomatic: Application.EnableEvents = True: Application.StatusBar = False
MsgBox "Echec --> erreur: " & Err.Description
End Sub