Ligne colorée ?

Bonsoir j'ai cette macro, mais je voudrais que la ligne soit colorée à partir de la colonne B , merci à vous.

Dim derlig As Integer, dercol As Integer, lig As Integer
    Application.ScreenUpdating = False
    Rows.Interior.ColorIndex = xlNone
    derlig = Columns("B").Find("*", , , , , xlPrevious).Row
    dercol = Cells(1, Columns.Count).End(xlToLeft).Column
    For lig = 2 To derlig
            If InStr(Cells(lig, "B"), "BONJOUR") > 0 Then
            Rows(lig).Resize(1, dercol).Interior.ColorIndex = 43

Bonjour

Testes

            If InStr(Cells(lig, "B"), "BONJOUR") > 0 Then
            Cells(lig, "B").Resize(1, dercol - 1).Interior.ColorIndex = 43
Banzai64 a écrit :

Bonjour

Testes

            If InStr(Cells(lig, "B"), "BONJOUR") > 0 Then
            Cells(lig, "B").Resize(1, dercol - 1).Interior.ColorIndex = 43

Touché, coulé, merci

Rechercher des sujets similaires à "ligne coloree"