Supprimer certaine mise en forme conditionnelle

Bonjour,

J'ai un tableau avec en colonne I un condition pour afficher une barre de donnée en %

Dans ce tableau je voudrais sélectionner la ligne complète du tableau pour une meilleure visibilité.

Dim zone As Range
Set zone = ActiveCell.CurrentRegion

Cells.FormatConditions.Delete

With ActiveCell.CurrentRegion.FormatConditions.Add(Type:=xlExpression, Formula1:="=LIGNE(" & ActiveCell.CurrentRegion.Cells(1).Address(False, False) & ")=" & ActiveCell.Row)
.Font.ColorIndex = 2
.Interior.ColorIndex = 32
End With

C'est lui Cells.FormatConditions.Delete qui me supprime la totalité des conditions.

Avez vous une idée ?

Bonjour,

pourquoi la supprimer ?
Tu mets la tienne pour qu'elle soit par dessus, et tu commences en supprimant ta précédente si elle existe en testant Formula1

J'ai réussi, merci

Static xRow
Static xColumn
If xColumn <> "" Then
    With Columns(xColumn).Interior
        .ColorIndex = xlNone
    End With
    With Rows(xRow).Interior
       .ColorIndex = xlNone
    End With
End If
pRow = Selection.Row
pColumn = Selection.Column
xRow = pRow
xColumn = pColumn

With Rows(pRow).Interior
    .ColorIndex = 31
    .Pattern = xlSolid
End With
Rechercher des sujets similaires à "supprimer certaine mise forme conditionnelle"