Bonjour a tous,
j'utilise ce code pour créer toute les possibilité de 6 feuille excel,
mais la compilation prend des heures.
je fait End(xlUp).Row pour définir le nombre de ligne sur chacune de mes colonnes.
Je ne voit pas d'autre type d'approche, avez vous déjà eu ce genre de problème?
	
	
	
	
	
		
	
		
			
		
		
	
				
			j'utilise ce code pour créer toute les possibilité de 6 feuille excel,
mais la compilation prend des heures.je fait End(xlUp).Row pour définir le nombre de ligne sur chacune de mes colonnes.
Je ne voit pas d'autre type d'approche, avez vous déjà eu ce genre de problème?
		Code:
	
	
	Sub createall()
    Dim WS1 As Worksheet
    Dim i As Long, j As Long, k As Long
    Dim l, m, n, o, p, q, r, s, t, u, v, w, A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, ROUND As Integer
    Dim  lastrow As Long
    
For ROUND = 1 To 6
If ROUND = 1 Then Set WS1 = ThisWorkbook.Sheets("P1")
If ROUND = 2 Then Set WS1 = ThisWorkbook.Sheets("P2")
If ROUND = 3 Then Set WS1 = ThisWorkbook.Sheets("P3")
If ROUND = 4 Then Set WS1 = ThisWorkbook.Sheets("P4")
If ROUND = 5 Then Set WS1 = ThisWorkbook.Sheets("P5")
If ROUND = 6 Then Set WS1 = ThisWorkbook.Sheets("P6")
    A1 = WS1.Range("A65536").End(xlUp).Row
    B1 = WS1.Range("B65536").End(xlUp).Row
    C1 = WS1.Range("C65536").End(xlUp).Row
    D1 = WS1.Range("D65536").End(xlUp).Row
    E1 = WS1.Range("E65536").End(xlUp).Row
    F1 = WS1.Range("F65536").End(xlUp).Row
    G1 = WS1.Range("G65536").End(xlUp).Row
    H1 = WS1.Range("H65536").End(xlUp).Row
    I1 = WS1.Range("I65536").End(xlUp).Row
    J1 = WS1.Range("J65536").End(xlUp).Row
    K1 = WS1.Range("K65536").End(xlUp).Row
    L1 = WS1.Range("L65536").End(xlUp).Row
    M1 = WS1.Range("M65536").End(xlUp).Row
    N1 = WS1.Range("N65536").End(xlUp).Row
    O1 = WS1.Range("O65536").End(xlUp).Row
    
    Application.ScreenUpdating = False
   lastrow = 10
    For i = 1 To A1: For j = 1 To B1
    For k = 1 To C1: For l = 1 To D1
    For m = 1 To E1: For n = 1 To F1
    For o = 1 To G1: For p = 1 To H1
    For q = 1 To I1: For r = 1 To J1
    For s = 1 To K1: For t = 1 To L1
    For u = 1 To M1: For v = 1 To N1
    For w = 1 To O1
        WS1.Range("v" & lastrow).Value = _
        WS1.Range("A" & i).Value & WS1.Range("B" & j).Value & WS1.Range("C" & k).Value & WS1.Range("D" & l).Value & _
        WS1.Range("E" & m).Value & WS1.Range("F" & n).Value & WS1.Range("G" & o).Value & WS1.Range("H" & p).Value & _
        WS1.Range("I" & q).Value & WS1.Range("J" & r).Value & WS1.Range("K" & s).Value & WS1.Range("L" & t).Value & _
        WS1.Range("M" & u).Value & WS1.Range("N" & v).Value & WS1.Range("O" & w).Value & "00000"
        lastrow = lastrow + 1
    Next: Next
    Next: Next
    Next: Next
    Next: Next
    Next: Next
    Next: Next
    Next: Next
    Next
Next
    Application.ScreenUpdating = True
End Sub
	
	
			
			
