Help macro Excel
Résolu/Fermé
A voir également:
- Help macro Excel
- Telecharger macro convertir chiffre en lettre excel - Télécharger - Tableur
- Liste déroulante excel - Guide
- Si et excel - Guide
- Word et excel gratuit - Guide
- Aller à la ligne excel - Guide
2 réponses
jipicy
Messages postés
40842
Date d'inscription
jeudi 28 août 2003
Statut
Modérateur
Dernière intervention
10 août 2020
4 897
27 juin 2007 à 18:18
27 juin 2007 à 18:18
Bonjour !
Comment ?
;-)
Comment ?
;-)
j'ai trouvé :
Sub hasard()
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim l As Integer
Dim m As Integer
For m = 9 To 139
i = Fix(Rnd() * (6 - 1) + 1)
Cells(m, 5).Value = i
Do
j = Fix(Rnd() * (6 - 1) + 1)
Loop Until j <> i
Cells(m, 6).Value = j
Do
k = Fix(Rnd() * (6 - 1) + 1)
Loop Until k <> i And k <> j
Cells(m, 7).Value = k
Do
l = Fix(Rnd() * (6 - 1) + 1)
Loop Until l <> k And l <> j And l <> i
Cells(m, 8).Value = l
Next m
End Sub
merci quand meme
Sub hasard()
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim l As Integer
Dim m As Integer
For m = 9 To 139
i = Fix(Rnd() * (6 - 1) + 1)
Cells(m, 5).Value = i
Do
j = Fix(Rnd() * (6 - 1) + 1)
Loop Until j <> i
Cells(m, 6).Value = j
Do
k = Fix(Rnd() * (6 - 1) + 1)
Loop Until k <> i And k <> j
Cells(m, 7).Value = k
Do
l = Fix(Rnd() * (6 - 1) + 1)
Loop Until l <> k And l <> j And l <> i
Cells(m, 8).Value = l
Next m
End Sub
merci quand meme