XL 2010 couleur cellule en fonction des couleurs de MFC

gh4

XLDnaute Occasionnel
bonjour a tous,
j'aimerai colorer une cellule simple en fonction du résultat couleur de 2 MFC
mon code me renvoie une erreur 438 en ligne 10
Sub Macro1()
Dim couleur As Long
couleur = RGB(255, 0, 0)
lign = 3
colon = 3
Cells(lign, colon).Select

If Cells(lign + 1, 2) = "C" Then
If Cells(lign + 1, colon).DisplayFormat.Interior.Color = couleur Then
10 Cells(lign, colon).Interior.Color = couleur
GoTo 920
End If
End If

If Cells(lign + 2, 2) = "C" Then
If Cells(lign + 2, colon).DisplayFormat.Interior.Color = couleur Then
Cells(lign, colon).Interior.Color = couleur
GoTo 920
End If
End If
Cells(lign, colon).Interior.Color = RGB(255, 255, 255)

920
End Sub
par avance merci
 

Pièces jointes

  • test.xls
    37.5 KB · Affichages: 5

Discussions similaires

Réponses
0
Affichages
137

Statistiques des forums

Discussions
312 106
Messages
2 085 351
Membres
102 871
dernier inscrit
Maïmanko