Private Sub Worksheet_Change(ByVal Target As Range)
Dim Ws As Worksheet, Cel As Range, H As Range, Lr As Long
' dernière ligne renseignée de la colonne A
Lr = Me.Columns("A").Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For Each Cel In Target
Select Case True
Case Not Intersect(Cel, Me.Range("A6:A" & Lr)) Is Nothing
Cel.Hyperlinks.Delete
If Cel <> "" Then
' Partie à adapter ------------------------
Set Ws = Worksheets("Inventaire parc")
' on cherche la valeur de Cel dans la colonne B de la feuille WS après la cellule B7
Set H = Ws.Columns("B").Find(Cel, Ws.[B7])
' -----------------------------------------
If Not H Is Nothing _
Then Me.Hyperlinks.Add Cel, H.Hyperlinks(1).Address, H.Hyperlinks(1).SubAddress
End If
Case Not Intersect(Cel, Me.Range("H6:H" & Lr)) Is Nothing
Cel.Hyperlinks.Delete
If Cel <> "" Then
Set Ws = Worksheets("Inventaire parc")
Set H = Ws.Columns("B").Find(Cel, Ws.[B7])
If Not H Is Nothing _
Then Me.Hyperlinks.Add Cel, H.Hyperlinks(1).Address, H.Hyperlinks(1).SubAddress
End If
' Case blablabla
' ...................
' ...................
Case Else
' ...................
' ...................
End Select
Next