Bonjour,

J'aimerai simplifier le code ci-dessous
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
 
i = 56
t = 40
Range("N40").Select
For a = 1 To 10
    i = i + 1
    t = t + 1
 
    If Range("B" & i).Font.Color = RGB(255, 0, 0) Then
        Range("N" & t).Interior.ColorIndex = 37
    End If
    If Range("C" & i).Font.Color = RGB(255, 0, 0) Then
        Range("O" & t).Interior.ColorIndex = 37
    End If
    If Range("D" & i).Font.Color = RGB(255, 0, 0) Then
        Range("P" & t).Interior.ColorIndex = 37
    End If
    If Range("E" & i).Font.Color = RGB(255, 0, 0) Then
        Range("Q" & t).Interior.ColorIndex = 37
    End If
    If Range("F" & i).Font.Color = RGB(255, 0, 0) Then
        Range("R" & t).Interior.ColorIndex = 37
    End If
    If Range("G" & i).Font.Color = RGB(255, 0, 0) Then
        Range("S" & t).Interior.ColorIndex = 37
    End If
    If Range("H" & i).Font.Color = RGB(255, 0, 0) Then
        Range("T" & t).Interior.ColorIndex = 37
    End If
    If Range("I" & i).Font.Color = RGB(255, 0, 0) Then
        Range("U" & t).Interior.ColorIndex = 37
    End If
    If Range("J" & i).Font.Color = RGB(255, 0, 0) Then
        Range("V" & t).Interior.ColorIndex = 37
    End If
    If Range("K" & i).Font.Color = RGB(255, 0, 0) Then
        Range("W" & t).Interior.ColorIndex = 37
    End If
 
    If Range("L" & i).Font.Color = RGB(255, 0, 0) Then
        Range("X" & t).Interior.ColorIndex = 37
    End If
    If Range("M" & i).Font.Color = RGB(255, 0, 0) Then
        Range("Y" & t).Interior.ColorIndex = 37
    End If
    If Range("N" & i).Font.Color = RGB(255, 0, 0) Then
        Range("Z" & t).Interior.ColorIndex = 37
    End If
    If Range("O" & i).Font.Color = RGB(255, 0, 0) Then
        Range("AA" & t).Interior.ColorIndex = 37
    End If
    If Range("P" & i).Font.Color = RGB(255, 0, 0) Then
        Range("AB" & t).Interior.ColorIndex = 37
    End If
    If Range("Q" & i).Font.Color = RGB(255, 0, 0) Then
        Range("AC" & t).Interior.ColorIndex = 37
    End If
    If Range("R" & i).Font.Color = RGB(255, 0, 0) Then
        Range("AD" & t).Interior.ColorIndex = 37
    End If
    If Range("S" & i).Font.Color = RGB(255, 0, 0) Then
        Range("AE" & t).Interior.ColorIndex = 37
    End If
    If Range("T" & i).Font.Color = RGB(255, 0, 0) Then
        Range("AF" & t).Interior.ColorIndex = 37
    End If
 
Next
J'ai essayé d'effectuer avec une deuxième boucle en me déplacent d'une colonne, et cela ne fonctionne pas.

Pourriez-vous m'aider à améliorrer cette codification.

Par avance merci de votre aide.