1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Private Sub Worksheet_Change(ByVal Target As Range)
Dim j As Long
If Application.Intersect(Target, Range("P7:P50000")) Is Nothing Then Exit Sub
If Cells(Target.Row, 16) <> "" Then
j = Sheets("PRE encours").Cells(Rows.Count, 1).End(xlUp).Row + 1
Sheets("PRE encours").Range("A" & j) = Cells(Target.Row, 1)
Sheets("PRE encours").Range("B" & j) = Cells(Target.Row, 5)
Sheets("PRE encours").Range("C" & j) = Cells(Target.Row, 6)
Sheets("PRE encours").Range("D" & j) = Cells(Target.Row, 7)
Sheets("PRE encours").Range("E" & j) = Cells(Target.Row, 8)
Sheets("PRE encours").Range("F" & j) = Cells(Target.Row, 9)
Sheets("PRE encours").Range("G" & j) = Cells(Target.Row, 10)
Sheets("PRE encours").Range("H" & j) = Cells(Target.Row, 17)
End If
End Sub |
Partager