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
| Sub test()
Dim effectif As Integer
Dim aa As Integer
Dim ee As Integer
Dim boucle As Integer
Sheets("Feuil3").Select
Message0bis = InputBox("Entrez le nombre de moule:", "Moule", "Nbre moule")
Message0 = InputBox("Entrez le nombre d'échantillon :", "Echantillon", "Nbre echantillon")
Message1 = InputBox("Entrez la position A :", "position", "position A")
Message2 = InputBox("Entrez la position B :", "position", "position B") 'demande postion
Message3 = InputBox("Entrez la position C :", "position", "position C")
Message4 = InputBox("Entrez la position D :", "position", "position D")
effectif = Message0bis * Message0 * 36
aa = 0
ee = 0
boucle = Message0bis * Message0 - 1
For aa = 0 To boucle * 148 Step 148
Range("L2").Value = Application.WorksheetFunction.StDev(Worksheets("Feuil1").Range("F2:F37").Offset(aa))
Range("L3").Value = Range("L3").Value + Range("L2").Value
ee = ee + 1
Next aa
Range("L4").Value = (Range("L3").Value) / ee
Range("L4").Select
Selection.Copy
Range("C10").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("L2:L4").Clear
End Sub |
Partager