Sub LigneAlterne() Dim lNoLigne As Long Dim iColor1 As Integer, iColor2 As Integer, iColmin As Integer, iColmax As Integer Dim rCel As Range Set rCel = Selection lNoLigne = rCel.Row iColmin = rCel.Column iColmax = rCel.Columns.Count + iColmin - 1 iColor1 = Cells(lNoLigne, iColmin).Interior.ColorIndex iColor2 = Cells(lNoLigne + 1, iColmin).Interior.ColorIndex For lNoLigne = lNoLigne To lNoLigne + rCel.Rows.Count - 1 Step 2 Range(Cells(lNoLigne, iColmin), Cells(lNoLigne, iColmax)).Interior.ColorIndex = iColor1 Range(Cells(lNoLigne + 1, iColmin), Cells(lNoLigne + 1, iColmax)).Interior.ColorIndex = iColor2 Next
End Sub |