Bonjour,
pour ton premier problème, je confirme ma proposition
With Sheets("feuil2")
Sheets("Data").Cells(i, 3) = WorksheetFunction.CountIf(Range(.Cells(14, i), .Cells(56, i)), "NC")
End With
ou
Sheets("Data").Cells(i, 3) = WorksheetFunction.CountIf(Range(Sheets("feuil2").Cells(14, i),Sheets("feuil2") .Cells(56, i)), "NC")
pour ton second problème, tu ne peux pas avoir d'opérateur logique dans l'instruction InStr, tu dois répéter tes instructions instr
et les lier par or
donc au lieu de
If InStr(1, Sheets("Feuil2").Cells(x, i), "CARLIER" Or "MOREAU" Or "WATELLE" Or "DELATTRE", vbTextCompare) <> 0
mettre
If InStr(1, Sheets("Feuil2").Cells(x, i), "CARLIER", vbTextCompare) <> 0 or InStr(1, Sheets("Feuil2").Cells(x, i),"MOREAU" , vbTextCompare) <> 0 or ... then