Una famiglia di software per fogli di calcolo Microsoft con strumenti per l'analisi, la creazione di grafici e la comunicazione dei dati.
Ciao non avevo inteso che ci si dovesse fermare alla B52 ma che occorresse ripetere l'inserimento in base al numero di voci presenti nelle combobox (e che i dati inseriti fossero solo un esempio parziale).
Comunque prova a riscaricare il file dal precedente link.
Ho modificato così il codice del pulsante:
Private Sub CommandButton1_Click()
Dim iListIndex As Long
Dim iListCount As Long
Dim i As Long, j As Long
Dim iProg1 As Long, iProg2 As Long
Dim iCell As Long
Const iNumeroSetDati As Long = 5
With Me
With .ComboBox1
iListCount = .ListCount
iListIndex = .ListIndex + 1
If iListIndex > 0 Then
For i = iListIndex To iListCount
iProg1 = iProg1 + 1
If iProg1 > iNumeroSetDati \* 2 Then Exit For
Range("B2").Offset(iProg2).Value = .List(i - 1)
If iProg1 Mod 2 = 1 Then
iProg2 = iProg2 + 6
Else
iProg2 = iProg2 + 5
End If
Next i
For i = 1 To iListIndex - 1
iProg1 = iProg1 + 1
If iProg1 > iNumeroSetDati \* 2 Then Exit For
Range("B2").Offset(iProg2).Value = .List(i - 1)
If iProg1 Mod 2 = 1 Then
iProg2 = iProg2 + 6
Else
iProg2 = iProg2 + 5
End If
Next i
End If
End With
iCell = 3
For j = 2 To 6
iProg1 = 0
iProg2 = 0
With .Controls("ComboBox" & j)
iListCount = .ListCount
iListIndex = .ListIndex + 1
If iListIndex > 0 Then
For i = iListIndex To iListCount
iProg2 = iProg2 + 1
If iProg2 > iNumeroSetDati Then Exit For
Range("B" & iCell).Offset(iProg1).Value = .List(i - 1)
iProg1 = iProg1 + 11
Next i
For i = 1 To iListIndex - 1
iProg2 = iProg2 + 1
If iProg2 > iNumeroSetDati Then Exit For
Range("B" & iCell).Offset(iProg1).Value = .List(i - 1)
iProg1 = iProg1 + 11
Next i
End If
End With
iCell = iCell + 1
Next j
End With
End Sub
Vedi se "gira" come da tue attese.
ciao