1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Sub Test()
'
' Test Macro
Sheets("Quotidien").Activate
DerniereLigne = Range("A" & Rows.Count).End(xlUp).Row
For c = 3 To DerniereLigne
If Format(Cells(c, 1), "DDDD") = "samedi" Then
Range(Cells(c, 1), Cells(c, 21)).Font.ColorIndex = 1
With Range(Cells(c, 1), Cells(c, 21)).Interior
.ColorIndex = 40
.Pattern = xlSolid
End With
Else
Range(Cells(c, 1), Cells(c, 21)).Font.ColorIndex = 1
With Range(Cells(c, 1), Cells(c, 21)).Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
End If
Next
End Sub |
Partager