Option Explicit
Sub Comparaison()
'
Dim VALEURA As String, ShComp As Worksheet
Dim i As Long
'
Set ShComp = Sheets("Compétences")
For i = 9 To 59
VALEURA = Range("B" & i).Value
With Application.WorksheetFunction
If .CountIf(Range(Cells(9, "B"), Cells(59, "B")), VALEURA) > 0 Then
ShComp.Range("A" & i).EntireRow.Locked = True
End If
End With
Next i
ShComp.Protect
End Sub