Arnaud5962
XLDnaute Junior
bonjour, voici ma macro mais je voudrais qu'en plus de cela, elle me surligne en jaune, les ligne dont la valeur de la colonne en H est négative.
Merci d'avance
Sub jaune()
Dim c As Range
Application.FindFormat.Clear
With Worksheets(1).Range("a1:j500")
Set c = .Find("Remboursement", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
With c.EntireRow.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
Set c = .Find("Annulé", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
With c.EntireRow.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
Set c = .Find("Paiement reçu", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
With c.EntireRow.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub
Merci d'avance
Sub jaune()
Dim c As Range
Application.FindFormat.Clear
With Worksheets(1).Range("a1:j500")
Set c = .Find("Remboursement", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
With c.EntireRow.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
Set c = .Find("Annulé", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
With c.EntireRow.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
Set c = .Find("Paiement reçu", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
With c.EntireRow.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub