Sub Tiragz()
Application.ScreenUpdating = False
With [Tableau14].ListObject.Range
.Cells(1, .Columns.Count + 1).EntireColumn.Resize(, 4).Clear 'RAZ
If .Rows.Count < 276 Then MsgBox "Le tableau doit avoir au moins 275 lignes...": Exit Sub
.Columns(3).Resize(, 2).Copy .Cells(1, .Columns.Count + 3) 'copier-coller
With .Cells(2, .Columns.Count + 2).Resize(.Rows.Count - 1)
.Formula = "=RAND()" 'ALEA()
.Value = .Value 'supprime les formules
.Resize(, 3).Sort .Cells, Header:=xlNo 'tri
.Cells(276).Resize(Rows.Count - .Row - 274, 3).Clear 'RAZ en dessous
.Resize(225) = "Echantillon"
.Cells(226).Resize(50) = "Réserve"
.Resize(, 3).Columns.AutoFit 'ajustement largeurs
End With
End With
End Sub