Private Sub CommandButton1_Click()
debut = Timer
Sheets("A renseigner").Range("A2:[COLOR=blue]C65536[/COLOR]").ClearContents
Sheets("Non pointé").Range("A2:[COLOR=blue]C65536[/COLOR]").ClearContents
'Boisgontier
ligneEcrit = 2
With Sheets("Inventaire")
nblignes = .[A65000].End(xlUp).Row + 1
For i = 2 To nblignes
x = .Cells(i, 1)
If IsError(Application.Match(x, Sheets("Materiel").[A2:A1000], 0)) Then
[COLOR=red] '.Cells(i, 1).EntireRow.Copy[/COLOR]
[COLOR=red] 'Sheets("A renseigner").Cells(ligneEcrit, 1).Insert Shift:=xlDown[/COLOR]
[COLOR=blue]Sheets("A renseigner").Cells(ligneEcrit, 1) = x[/COLOR]
[COLOR=blue] Sheets("A renseigner").Cells(ligneEcrit, 2) = .Cells(i, 2)[/COLOR]
[COLOR=blue] Sheets("A renseigner").Cells(ligneEcrit, 3) = .Cells(i, 3)[/COLOR]
ligneEcrit = ligneEcrit + 1
End If
Next i
End With
'---
ligneEcrit = 2
With Sheets("Materiel")
nblignes = [A65000].End(xlUp).Row + 1
For i = 2 To nblignes
x = .Cells(i, 1)
If IsError(Application.Match(x, Sheets("Inventaire").[A2:A1000], 0)) Then
[COLOR=red]'.Cells(i, 1).EntireRow.Copy[/COLOR]
[COLOR=red] 'Sheets("Non pointé").Cells(ligneEcrit, 1).Insert Shift:=xlDown[/COLOR]
[COLOR=blue]Sheets("Non pointé").Cells(ligneEcrit, 1) = x[/COLOR]
[COLOR=blue] Sheets("Non pointé").Cells(ligneEcrit, 2) = .Cells(i, 2)[/COLOR]
[COLOR=blue] Sheets("Non pointé").Cells(ligneEcrit, 3) = .Cells(i, 3)[/COLOR]
ligneEcrit = ligneEcrit + 1
End If
Next i
End With
Application.CutCopyMode = False
MsgBox (Timer - debut & " Traitement terminé")
End Sub