Bonjour,
je suis vraiment coincé s'il y a quelqu'un qui peut m'aider dans un classeur Excel j'ai nommé une feuille "BD" qui contienne toute les enregistrement de l'année étaler sur cinq colonnes A=Date,B=Montant,C=Noms et prénoms,D=Ville,E=Qualité je voudrais extraire ses données par période (Quinzaine,Mensuelle,Trimestrielle ect.......) selon les besoin les résultat de l'extraction sera transférer vers une autre feuille Nommée "Collection"pour pouvoir l'éditer pour cela j'ai créer un userform qui contiens deux textBox nommée "StartDate"et "StopDate" et un bouton "Ok" qui abrite le code mais ça n'a pas marche AIDEZ MOIS SVP
Voici le code
On Error GoTo errorHandler
Dim StartDate As String
Dim StopDate As String
Dim startRow As Integer
Dim stopRow As Integer
If StartDate = "" Then End
StartDate = Format(StartDate, "dd/mm/yyyy")
If StopDate = "" Then End
StopDate = Format(StopDate, "dd/mm/yyyy")
If Range("a2").Value >= Me.StartDate.Value And Range("a2").Value <= Me.StopDate.Value Then
Sheets("BD").Range("A2" & startRow & ":A65536" & stopRow).Copy _
Destination:=Sheets("collection").Range("A")
End
errorHandler:
MsgBox "There has been an error: " & Error() & Chr(13) _
& "Ending Sub.......Please try again", 48
End If
End Sub