galopin01
Messages postés133Date d'inscriptionlundi 4 octobre 2004StatutMembreDernière intervention14 octobre 20111 2 nov. 2004 à 21:12
Bonsoir,
Celle macro donne le résultat escompté dans la colonne E
Elle fonctionne quel que soit le nombre d'éléments dans les colonnes ABCD
Sub Test()
An = [A65536].End(xlUp).Row
Bn = [B65536].End(xlUp).Row
Cn = [C65536].End(xlUp).Row
Dn = [D65536].End(xlUp).Row
For Ai = 1 To An
ZA = Range("A" & Ai).Value
For Bi = 1 To Bn
ZB = Range("B" & Bi).Value
For Ci = 1 To Cn
ZC = Range("C" & Ci).Value
For Di = 1 To Dn
ZD = Range("D" & Di).Value
Cells(5 + (i * 256)).Value = ZA & ZB & ZC & ZD
i = i + 1
Next
Next
Next
Next
End Sub