1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Sub enreg_intervenant()
Application.ScreenUpdating = False
Dim j As Integer
With Sheets("feuil3")
If .Cells(8, 5) = "" And .Cells(9, 5) = "" Then j = 8
If .Cells(8, 5) <> "" And .Cells(9, 5) = "" And .Cells(10, 5) = "" Then j = 9
If .Cells(9, 5) <> "" And .Cells(10, 5) = "" And .Cells(11, 5) = "" Then j = 10
If .Cells(10, 5) <> "" And .Cells(11, 5) = "" And .Cells(12, 5) = "" Then j = 11
If .Cells(11, 5) <> "" And .Cells(12, 5) = "" And .Cells(13, 5) = "" Then j = 12
If .Cells(12, 5) <> "" And .Cells(13, 5) = "" And .Cells(14, 5) = "" Then j = 13
If .Cells(13, 5) <> "" And .Cells(14, 5) = "" And .Cells(15, 5) = "" Then j = 14
If .Cells(14, 5) <> "" And .Cells(15, 5) = "" And .Cells(16, 5) = "" Then j = 15
If .Cells(15, 5) <> "" And .Cells(16, 5) = "" And .Cells(17, 5) = "" Then j = 16
If .Cells(16, 5) <> "" And .Cells(17, 5) = "" And .Cells(18, 5) = "" Then j = 17
If .Cells(17, 5) <> "" And .Cells(18, 5) = "" And .Cells(19, 5) = "" Then j = 18
If .Cells(18, 5) <> "" And .Cells(18, 5) <> "" And .Cells(19, 5) = "" Then j = 19
End With
With Sheets("feuil2")
.Activate
.Range("E24:V24").Copy
Sheets("feuil3").Range("E" & j).PasteSpecial Paste:=xlPasteValues
End With
Sheets("feuil3").Select
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub |