XL 2013 colonne identique

omar88

XLDnaute Nouveau
j'ai un tableau c'est juste un exemple

colonne A colonne B colonne C

1 ***********0** **********1

0 ***********1*************0

1 **********1 *************1

1 **********0 *************1

on remarque que la colonne A et colonne C sont identique donc il faut les identifier comme identique par couleur ainsi de suite car j'ai bcp de colonne et a la place de zero j'ai des cellules vide
j'ai toute essayer recherche v et h mais il faut que ca soit en vba et je suis debutant dans ce domaine donc voila mon code
VB:
Sub colonnesDoublons()

Dim Cell As Range
 

Dim j As Integer, i As Integer, c As Integer, N As Integer


For c = 1 To 100


Range(Cell(i, j).Value) = c

Next c

For N = 1 To 256

Cell.Font.ColorIndex = N

Next N

For i = 1 To 100

If Cell(i, j).Value = Cell(i + 1, j).Value Then c = c + 1

Next i

For j = 1 To 100

If Cell(i, j).Value = Cell(i, j + 1).Value Then c = c + 1

Next j

End Sub
 

Discussions similaires