Sub Archiver()
Dim n As Integer
Dim lig As Range
Set lig = Worksheets("onglet3").Range("A65536").End(xlUp).Offset(1, 0)
For n = 1 To 2000
If Worksheets("onglet1").Range("A" & n).Value = Range("archive_ref").Value Then
Worksheets("onglet1").Range("A" & n).EntireRow.Cut
lig.Select
ActiveSheet.Paste
Dim I As Long
Dim Plage As Range
Set Plage = Worksheets("onglet2").Range("A7:A" & Range("A7").End(xlDown).Row)
For I = Plage.Cells.Count To 1 Step -1
If Plage.Cells(I).Value = Range("archive_ref").Value Then
Plage.Cells(I).EntireRow.Delete
End If
Next
End If
Next n
End Sub