Sub essai()
Dim test() As String
Dim x As Integer
Dim i As Integer
Dim mafeuille As Worksheet
x = 0
Set mafeuille = Worksheets("Feuil1")
With mafeuille
For i = 1 To .Range("A2").End(xlDown).Row
If .Cells(i, 2) = 1 Then
ReDim Preserve test(x)
test(x) = .Cells(i, 1).Value
MsgBox test(x)
x = x + 1
End If
Next i
End With
End Sub