Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim c As Range
If Target.Address = "$AD$1" Then
Range("Y2:AC100").Value = ""
ActiveWorkbook.Names("NbClick").RefersTo = "=0"
Exit Sub
End If
If Intersect(ActiveCell, Range("S2:S100")) Is Nothing Then Exit Sub
ActiveWorkbook.Names("NbClick").RefersTo = [NbClick] + 1
If [NbClick] = 1 Then
ActiveWorkbook.Names("Lig1").RefersTo = Target.Row
ElseIf [NbClick] = 2 Then
For Each c In Range(Cells(Target.Row, 20), Cells(Target.Row, 24))
Cells([Lig1], c.Column + 5) = Cells(Target.Row, c.Column)
Next
End If
End Sub