Bonjour Fornstep, le forum,
Salut Xmenpl,
Un essai....mais il y a certainement moyen d'optimiser...
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("B12:F13")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
Cancel = True
With Target
For i = 2 To 6
If i <> Target.Column Then
Cells(Target.Row, i).Interior.ColorIndex = xlNone
Cells(Target.Row, i + 7).Value = ""
End If
Next i
.Interior.ColorIndex = IIf(.Interior.ColorIndex = xlNone, 6, xlNone)
.Offset(0, 7) = IIf(.Interior.ColorIndex = xlNone, "", Target.Column - 1)
End With
End If
End Sub
Cordialement,