Bonjour
Recopier le code ci-dessous dans un module VBA
Fichier à enregistrer auparavant en "xlsm
Option Explicit
Public Sub Format_Cellules()
Dim Cellule As Range
Dim Plage As Range
With ActiveSheet
Set Plage = Range("A1").CurrentRegion
End With
For Each Cellule In Plage
Cellule.NumberFormat = "0;0"
Select Case Cellule
Case Is > 1000
Cellule.NumberFormat = "#\.##0;(#\.##0)"
Case Is > -1000
Cellule.NumberFormat = "0;(0)"
Case Else
Cellule.NumberFormat = "#\.##0;(#\.##0)"
End Select
Next
End Sub
Mes excuses,
Je n'avais pas vu la réponse précédente.
Il y a doublon
Jean-Eric