1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Option Explicit
Sub gogo()
Dim tbo As Variant
Dim cell As Range
Dim I As Long
' Pour ne pas être gêné par les noms au pluriel ou par leur casse, voir le nommage de cellules d'en-têtes spécifique
'on initialise la plage à 0
Range(Cells(2, 2), Cells(Columns(1).Find("*", , , , , xlPrevious).Row, 4)).Value = 0
For Each cell In Range(Range("A2"), Cells(Columns(1).Find("*", , , , , xlPrevious).Row, 1))
tbo = Split(cell.Value) 'séparateur par défaut = " "
For I = 0 To UBound(tbo)
If IsNumeric(tbo(I)) = True Then
Cells(cell.Row, Range(tbo(I + 1)).Column).Value = tbo(I)
End If
Next I
Next cell
End Sub |
Partager