If Left(Range("A1"),1)="(" and Right(Range("A1"),1)=")" Then
Range("A1")=Mid(Range("A1"),2,Len(Range("A1"))-2)
Else
Range("A1")="(" & Range("A1") & ")"
End if
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim P As Range
Application.ScreenUpdating = False
With [A5:D54]
Set P = Intersect(Target, .Cells)
For Each Target In .Cells
If Target Like "(*)" Then Target = Mid(Target, 2, Len(Target) - 2)
Next Target
End With
If P Is Nothing Then Exit Sub
For Each Target In P
If Not IsNumeric(Target) Then Target = "(" & Target & ")"
Next Target
End Sub
Sub BoutonMettreEntreParenthèses()
Dim cell As Range
ActiveSheet.Unprotect Password:="."
For Each cell In Selection
If Left(cell, 1) = "(" And Right(cell, 1) = ")" Then
cell.Value = Mid(cell, 2, Len(cell) - 2)
Else
cell.Value = "(" & cell & ")"
End If
Next
ActiveSheet.Protect Password:="."
End Sub