Bonjour à toutes et à tous,

Je cherche à accélérer cette macro car le nombre de calcul est considérable et prend plusieurs jours !!!.

Nota : Je ne peux pas passer le calcul en manuel, des formules Excel sont nécessaires.

Merci par 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
Sub test2007()
Dim A, B, C, D, E, F
 
Application.ScreenUpdating = False
Range("NM1:NP65536").ClearContents
 
For A = 0.9 To 1.8 Step 0.1
For B = 1.5 To 2 Step 0.1
For C = 0.5 To 0.9 Step 0.1
For D = 0.5 To 2.3 Step 0.1
For E = 0.5 To 1.3 Step 0.1
For F = 0.5 To 1.9 Step 0.1
 
    Range("NM2").Value = A
    Range("NM3").Value = B
    Range("NM4").Value = C
    Range("NM5").Value = D
    Range("NM6").Value = E
    Range("NM7").Value = F
 
       If Range("NL1").Value = Range("NO1").Value Then Range("NO65536").End(xlUp)(2).Resize(6, 1).Value = Range("NM2:NM7").Value
       If Range("NL1").Value > Range("NO1").Value Then Range("NP1:NP1000").Value = Range("NO1:NO1000").Value
       If Range("NL1").Value > Range("NO1").Value Then Range("NO2:NO65536").ClearContents
       If Range("NL1").Value > Range("NO1").Value Then Range("NO2:NO7").Value = Range("NM2:NM7").Value
       If Range("NL1").Value > Range("NO1").Value Then Range("NO1").Value = Range("NL1").Value
 
      Next F
      Next E
      Next D
      Next C
      Next B
      Next A
 
        ActiveWorkbook.Save
             Application.ScreenUpdating = True
End Sub