Color sous Excel 2000

cs_Estelle2003 Messages postés 24 Date d'inscription mercredi 30 juillet 2003 Statut Membre Dernière intervention 11 septembre 2003 - 11 sept. 2003 à 14:20
cs_brico Messages postés 42 Date d'inscription vendredi 25 avril 2003 Statut Membre Dernière intervention 28 octobre 2003 - 22 oct. 2003 à 21:43
Bonjour,

Mon problème est le suivant :
Si dans la colonne K, 'MAT' est trouvé colore la ligne en rouge.
Mais moi je n'arrive qu'a coloré la cellule contenant le mot 'MAT'.

With Worksheets("Feuil1").Range("K1:K5000")
    Set c = .Find("MAT", LookIn:=xlValues)
    If Not c Is Nothing Then
        firstAddress = c.Address
        Do
            c.Font.ColorIndex = 3
            Set c = .FindNext(c)
        Loop While Not c Is Nothing And c.Address <> firstAddress
    End If
End With


merci d'avance pour votre aide.
Cordialement,
Estelle :)

3 réponses

pelw Messages postés 148 Date d'inscription dimanche 12 janvier 2003 Statut Membre Dernière intervention 14 février 2005 6
11 sept. 2003 à 16:23
Essaye ceci :

Rows(c.Row).Font.ColorIndex = 3

@+

pelw
0
cs_Estelle2003 Messages postés 24 Date d'inscription mercredi 30 juillet 2003 Statut Membre Dernière intervention 11 septembre 2003
11 sept. 2003 à 16:39
merci mais ça marche pas car je n'ai plus de couleur.

@+
Estelle :)
0
cs_brico Messages postés 42 Date d'inscription vendredi 25 avril 2003 Statut Membre Dernière intervention 28 octobre 2003
22 oct. 2003 à 21:43
TU PEUX CREER UNE MACRO SUR UN NOUVEAUX CLASSEUR AVEC TON FICHIER EXISTANT SUR CETTE MACRO TU FAIS UNE MISE EN FORME AU CONTIONNEL DANS TON MENU TU CHOISI EGALE A (NOM DE CE QUE TU CHERCHE TU MET UNE COULEUR)
PUIS TU Ferme ta macro tu enr tu vas dans ta macro que tu as creer ,modifié, tu ouvre le module et tu fais un copier coller du code vers ton code
brico a++++
0
Rejoignez-nous