Bonjour Rag02700
Voilà ce que j'ai essayé avec ce que tu m'a envoyé le code il s'exécute sans aucun problème mais il trouve rien, et quand je met Compid1 en commentaire là il me trouve les valeurs.
t'as une idée ?
Merci d'avance
Private Sub Bouton_Click()
Dim BA_AUTO As Workbook
Dim Nom_Fichier As String
Dim vData As Range
Dim myRange As Range
Dim Compid As Range
Dim Compid1 As Range
Dim SaSa As Range
Dim ZaZa As Range
Nom_Fichier = "C:\AZEDDD.xlsx" '--- \
Set BA_AUTO = Application.Workbooks.Open(Nom_Fichier)
Set SaSa = Worksheets("AD F1").Range(E10:E11)
Set ZaZa = Worksheets("AB F2").Range(E12:E14)
On Error Resume Next
Set myRange= Workbooks(""POP AUTO V2").Worksheets("CCARBM").Range("S3:S24")
For Each vData In myRange.Cells '--- teste chaque cellule de "S3:S24"
Set Compid = SaSa.Find(vData.Value, LookIn:=xlValues) Set Compid1 = ZaZa.Find(vData.Value, LookIn:=xlValues)
If Not Compid Is Nothing Then 'And Not Compid1 Is Nothing Then
vData.Interior.ColorIndex = 6
End If
Next vData
Set vData = Nothing
Set Compid = Nothing
Set Compid1= Nothing
Set myRange = Nothing
MsgBox ("AD IS CHECKED WITH SUCCES")
End If
ActiveWorkbook.Close savechanges:=False
End Sub