1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Sub compiler()
Dim i As Integer
Range("compteur").Value = 2
Sheets("Liste").Select
Range("B3:W38").Select
Selection.ClearContents
Range("A2").Select
Sheets("Bénéficiaires").Select
For Each cel In Range("cren")
If IsNumeric(cel.Value) Then
If cel.Value >= 1 Then
i = cel.Value
Sheets("Liste").Cells(1, i + 1).Value = Sheets("Liste").Cells(1, i + 1).Value + 1
j = Sheets("Liste").Cells(1, i + 1).Value
Sheets("Liste").Cells(j, i + 1).Value = Cells(cel.Row, 1).Value
End If
End If
Next
End Sub |
Partager