1 2 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 ColoriageMemeCouleur()
Dim i As Integer
Dim lig As Integer
lig = 0
ActiveSheet.Select
For i = ActiveSheet.UsedRange.Rows.Count To 1 Step -1
If Cells(i, "D").FormatConditions(1).ColorIndex = 35 And _
Cells(i, "E").FormatConditions(1).ColorIndex = 35 And _
Cells(i, "F").FormatConditions(1).ColorIndex = 35 And _
Cells(i, "G").FormatConditions(1).ColorIndex = 35 Then
Cells(i, "H").Interior.ColorIndex = 35 And _
Cells(i, "H").vale = "OK"
'Comptons les lignes effacées
lig = lig + 1
End If
Next i
'Affichons le nombre de lignes maj
MsgBox "Mise à jour de " & lig & " ligne(s) OK", vbOKOnly + vbInformation, "INFORMATION"
End Sub |
Partager