Re : Format
OK. Ce petit souci me permet de faire tourner ma macro.
Malheureusement, si celle-ci fonctionne, elle "bugge" et je ne sais pas pourquoi.
Le nombre de lignes à traiter est certes important, mais ne justifie pas que le programme plante.
Quelqu'un voit-il pourquoi ?
Je ne peux pas joindre le fichier pcq trop gros même zippé mais je mets le code :
Sub Couleurs()
With Sheets("Tot solde")
For k = 1 To 9 Step 2
For i = 4 To Sheets("G").Cells(65536, k).End(xlUp).row
For j = 8 To .[M65536].End(xlUp).row
If Sheets("G").Cells(i, k) = .Cells(j, 12) Then
.Range("A" & j & ":M" & j).Interior.ColorIndex = Sheets("G").Cells(i, k).Interior.ColorIndex
End If
Next j
Next i
Next k
For k = 1 To 9 Step 2
For i = 4 To Sheets("A").Cells(65536, k).End(xlUp).row
For j = 8 To .[M65536].End(xlUp).row
If Sheets("A").Cells(i, k) = .Cells(j, 12) Then
.Range("A" & j & ":M" & j).Interior.ColorIndex = Sheets("A").Cells(i, k).Interior.ColorIndex
End If
Next j
Next i
Next k
For k = 1 To 9 Step 2
For i = 4 To Sheets("B").Cells(65536, k).End(xlUp).row
For j = 8 To .[M65536].End(xlUp).row
If Sheets("B").Cells(i, k) = .Cells(j, 12) Then
.Range("A" & j & ":M" & j).Interior.ColorIndex = Sheets("B").Cells(i, k).Interior.ColorIndex
End If
Next j
Next i
Next k
For k = 1 To 9 Step 2
For i = 4 To Sheets("TP").Cells(65536, k).End(xlUp).row
For j = 8 To .[M65536].End(xlUp).row
If Sheets("TP").Cells(i, k) = .Cells(j, 12) Then
.Range("A" & j & ":M" & j).Interior.ColorIndex = Sheets("TP").Cells(i, k).Interior.ColorIndex
End If
Next j
Next i
Next k
End With
End Sub
Merci !