This one?
Public Sub CrearEncabezamiento()
Dim Columna As Integer
Application.ScreenUpdating = False
FormatearEncabezado
Columna = 11
For x = 3 To Hoja1.Range("A" & Rows.Count).End(xlUp).Row
For y = 1 To Hoja1.Range("A" & x)
If Columna > 1 Then Hoja1.Range("K1:N3").Copy Hoja1.Cells(1, Columna)
Hoja1.Cells(1, Columna) = "Camión " & y & Hoja1.Range("B" & x)
Columna = Columna + 4
Next
Next
Hoja1.Select
End Sub
See if I got this right
Public Sub CrearEncabezamiento()
'For help see: http://www.vbaexpress.com/forum/showthread.php?54672-Generate-an-table-Index
Dim rngCantidad As Range
Dim Columna As Long
Const finaCantidadRow As Long = 6
'Alternative: to use all Cantidadas (more than A4:A6)
'Dim finaCantidadRow as long
' finaCantidad = Sheets("Hoja1").Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False
FormatearEncabezado
With Sheets("Hoja1")
Set rngCantidad = .Range("A4") 'First Cantidad
'From first Camion Column to last Camion Column stepping 4 columns at a time
For Columna = 11 To .Cells(1, Columns.Count).End(xlToLeft).Column Step 4
.Cells(1, Columna) = "Camión " & rngCantidad & rngCantidad.Offset(0, 1)
'Move cantidad Range down one Row
Set rngCantidad = rngCantidad.Offset(1)
If rngCantidad.Row = finaCantidadRow Then Exit For
Next
End With
Application.ScreenUpdating = True
End Sub