bonjour, j'ai un petit soucis d'optimisation de code ( il est très long ) si quelqu'un peut m'aider à le réduire svp , en gros je veux une boucle qui fasse la même chose que le code suivant :
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
Set Plage1 = Range("F2:F65000")
Set Plage2 = Range("G2:G65000")
Set Plage3 = Range("H2:H65000")
Set Plage4 = Range("I2:I65000")
Set Plage5 = Range("J2:J65000")
Set Plage6 = Range("K2:K65000")
Set Plage7 = Range("L2:L65000")
Set Plage8 = Range("M2:M65000")
Set Plage9 = Range("N2:N65000")
Set Plage10 = Range("O2:O65000")
Set Plage11 = Range("P2:P65000")
Set Plage12 = Range("Q2:Q65000")
Set Plage13 = Range("R2:R65000")
Set Plage14 = Range("S2:S65000")
Set Plage15 = Range("T2:T65000")
Set Plage16 = Range("U2:U65000")
Set Plage17 = Range("V2:V65000")
Set Plage18 = Range("W2:W65000")
Set Plage19 = Range("X2:X65000")
Set Plage20 = Range("Y2:Y65000")
Set Plage21 = Range("Z2:Z65000")
Set Plage22 = Range("AA2:AA65000")
 
Somme1 = Application.WorksheetFunction.Sum(Plage1)
Somme2 = Application.WorksheetFunction.Sum(Plage2)
Somme3 = Application.WorksheetFunction.Sum(Plage3)
Somme4 = Application.WorksheetFunction.Sum(Plage4)
Somme5 = Application.WorksheetFunction.Sum(Plage5)
Somme6 = Application.WorksheetFunction.Sum(Plage6)
Somme7 = Application.WorksheetFunction.Sum(Plage7)
Somme8 = Application.WorksheetFunction.Sum(Plage8)
Somme9 = Application.WorksheetFunction.Sum(Plage9)
Somme10 = Application.WorksheetFunction.Sum(Plage10)
Somme11 = Application.WorksheetFunction.Sum(Plage11)
Somme12 = Application.WorksheetFunction.Sum(Plage12)
Somme13 = Application.WorksheetFunction.Sum(Plage13)
Somme14 = Application.WorksheetFunction.Sum(Plage14)
Somme15 = Application.WorksheetFunction.Sum(Plage15)
Somme16 = Application.WorksheetFunction.Sum(Plage16)
Somme17 = Application.WorksheetFunction.Sum(Plage17)
Somme18 = Application.WorksheetFunction.Sum(Plage18)
Somme19 = Application.WorksheetFunction.Sum(Plage19)
Somme20 = Application.WorksheetFunction.Sum(Plage20)
Somme21 = Application.WorksheetFunction.Sum(Plage21)
Somme22 = Application.WorksheetFunction.Sum(Plage22)
Merci d'avance