Ah oui, effectivement, ça n'avait rien à voir...
Tu sais, je pense que je vais bientôt t'appeler Mr Répertoire ou Mr Hypertexte
Voici le code et le fichier en retour :
Sub test_repertoire()
Dim dl&, i&, k%, vcherchee$
With Sheets("Répertoire")
dl = .usedrange.rows.count
For i = 3 To dl
For k = 1 To 5
If .Cells(i, k) <> "" Then
vcherchee = .Cells(i, k).Value
If Application.CountIf(Sheets("Listing matériel").Range("A:E"), vcherchee) > 0 Then
.Cells(i, k).Font.Color = xlNone
.Cells(i, k).Font.Underline = False
ancre = Sheets("Listing matériel").Cells.Find(what:=vcherchee, LookIn:=xlValues, lookat:=xlWhole).Address
.Cells(i, k).Hyperlinks.Add anchor:=.Cells(i, k), Address:="", SubAddress:="'Listing matériel'!" & ancre, TextToDisplay:=.Cells(i, k).Value
Else
.Cells(i, k).Font.Color = 255
.Cells(i, k).Font.Underline = True
End If
End If
Next k
Next i
End With
End Sub
A bientôt,