Private Sub Worksheet_Change(ByVal Target As Range)
Dim i&
Set Target = Intersect(Target, [B:B], UsedRange)
Application.ScreenUpdating = False
Application.EnableEvents = False 'désactive les évènements
On Error Resume Next
With Feuil2 'CodeName à adapter
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
For Each Target In Target 'si entrées/effacements multiples
If Target.Row > 1 Then
If LCase(Target) = "t" Then
i = 0
i = Application.Match(Target(1, 0), .Columns(1), 0)
If i = 0 Then i = .Cells(.Rows.Count, 1).End(xlUp).Row + 1: .Cells(i, 1) = Target(1, 0)
Hyperlinks.Add Target(1, 2), "", .Name & "!" & .Cells(i, 1).Address(0, 0), TextToDisplay:="A"
ElseIf Target = "" Then
Target(1, 2).Clear 'RAZ
.Rows(Application.Match(Target(1, 0), .Columns(1), 0)).Delete
End If
End If
Next
End With
[C:C].HorizontalAlignment = xlCenter 'centrage
Application.EnableEvents = True 'réactive les évènements
End Sub