1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Sub CommentFaire()
Dim Cellule As Range, Echantillon1 As Range, Echantillon2 As Range
Dim Nc As Long, Nb As Long
With Worksheets("Feuil1")
Nc = .Cells(.Rows.Count, "C").End(xlUp).Row
Set Echantillon1 = .Range("C2:C" & Nc)
Nb = .Cells(.Rows.Count, "B").End(xlUp).Row
Set Echantillon2 = .Range("B2:B" & Nb)
Set Cellule = .Range("A1")
End With
Cellule.Formula = "=T.TEST(" & Echantillon1.Address & "," & Echantillon2.Address & ",2,3)"
Set Echantillon1 = Nothing
Set Echantillon2 = Nothing
Set Cellule = Nothing
End Sub |