Option Explicit
Sub RéinstallerMeFC()
Dim RngSvgSel As Range, Wsh As Worksheet, Rng As Range, RngCol As Range
With Application: .EnableEvents = False: .Calculation = xlCalculationManual
.ScreenUpdating = False: End With
Set RngSvgSel = Selection
For Each Wsh In ThisWorkbook.Worksheets
If Not Wsh.CodeName Like "WshDoc*" Then
Set Rng = Wsh.ListObjects(1).Range
Set Rng = Rng.Rows(2).Resize(Rng.Rows.Count - 1)
Rng.FormatConditions.Delete
Application.GoTo Wsh.Cells(1, 1)
Set RngCol = Intersect(Wsh.[B:L], Rng)
With MeFCR1C1(RngCol, "=AND(RC3<0,RC4=0)")
.NumberFormat = ";;;"
.Interior.Color = &HBABABA
With .Borders(xlTop): .LineStyle = xlContinuous: .Color = &HE0E0E0: End With
With .Borders(xlBottom): .LineStyle = xlContinuous: .Color = &HA9A9A9: End With
.Borders(xlRight).LineStyle = xlLineStyleNone
.Borders(xlLeft).LineStyle = xlLineStyleNone: End With
Set RngCol = Intersect(Wsh.[C:C], Rng)
With MeFCR1C1(RngCol, "=RC4=0")
.Font.Color = &HA3A3A3: End With
RngCol.NumberFormat = "0.0??\ "
With MeFCR1C1(RngCol, "=ROUND(RC*1000,0)=ROUND(RC,0)*1000")
.NumberFormat = "0_._0_0_0\ ": End With
Set RngCol = Intersect(Wsh.[E:F], Rng)
RngCol.NumberFormat = "0.0 "
With MeFCR1C1(RngCol, "=ROUND(RC*10,0)=ROUND(RC,0)*10")
.NumberFormat = "0_._0 ": End With
With MeFCR1C1(Intersect(Wsh.[M:M], Rng), "=RC=""""")
.Interior.Color = &HBABABA:: End With
End If: Next Wsh
With Application: .GoTo RngSvgSel: .EnableEvents = True
.Calculation = xlCalculationAutomatic: End With
End Sub
Private Function MeFCR1C1(ByVal Rng As Range, ByVal Formule As String) As FormatCondition
With ActiveSheet.Names.Add(Name:="NomTemporairePourMeFC", RefersToR1C1:=Formule)
Application.GoTo Rng(1, 1)
Set MeFCR1C1 = Rng.FormatConditions.Add(Type:=xlExpression, Formula1:=.RefersToLocal)
.Delete: End With
MeFCR1C1.StopIfTrue = False
End Function