| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 
 | Sub Delet()
    Range("A3:J59").Select
    Selection.ClearContents
    Formules
    MFC
End Sub
 
Sub Formules()
    Application.ScreenUpdating = False
    Range("M4").FormulaR1C1 = "=COUNTIF(C1,""T7*"")"
    Range("M6").FormulaR1C1 = "=COUNTIF(C1,""T2*"")"
    Range("M8").FormulaR1C1 = "=COUNTIF(C1,""T3*"")"
    Range("M10").FormulaR1C1 = "=COUNTIF(C1,""T4*"")"
    Range("M13").FormulaR1C1 = "=R[-9]C+R[-7]C+R[-5]C+R[-3]C"
End Sub
 
Sub MFC()
    Dim DerLig As Long
    Formule = "=$A3=$L$20"
    DerLig = Range("A" & Rows.Count).End(xlDown).Row
    Range("A3").Select
    'Efface tous les formats conditionnels existants sur toute la plage sélectionnée
    Range("A3:A" & DerLig).FormatConditions.Delete
    'Ajoute un Format conditionnel
    Range("A3:A" & DerLig).FormatConditions.Add(xlExpression, xlLess, Formule).Interior.Color = RGB(255, 192, 0)
End Sub | 
Partager