Bonjour !
Sur une macro que je retravaille, il y a un bout de code dont je ne comprend pas le sens ni l'utilité, une âme charitable pour me le faire comprendre ou bien encore me l'optimiser ?
Voici la boucle en question :
Merci d'avance !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 i = 1 J = 1 Do While Cells(i, J) <> "DISPONIBLE" If J < 10 Then J = J + 1 Else J = 1 i = i + 1 End If Loop Do While Cells(i, J) <> "" If Left(Cells(i, 1), 5) <> "Total" Then If Cells(i, J).Value < 0 Then Cells(i, J).Select With Selection.Interior .PatternColorIndex = xlAutomatic .Color = 255 End With Else Cells(i, J).Select With Selection.Interior .Pattern = xlNone .TintAndShade = 0 .PatternTintAndShade = 0 End With End If End If i = i + 1 Loop
Partager