trié des date avec une boucle for each
Bonsoir a tous,
j ai un problème pour extraire des ligne entière d un tableau avec comme critère les date.
j ai crer un user qui recupere la date de début et la date de fin et je voudrai extraire toute les ligne entre ces deux date malheureusement ca ne se pase pas comme je le voudrai !!!
j ai mis un petit bout du code si quelle pourai m aider ce serai génial
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
DateDebut = TextBoxDateDebut.Value
DateDeFin = TextBoxDateFin.Value
CelSourceDeTri = "b8:b" & WSachat.Range("a65536").End(xlUp).Row
For Each CelSourceTest In WSachat.Range(CelSourceDeTri)
If CelSourceTest.Value >= DateDebut And CelSourceTest.Value <= DateDeFin Then
WSachat.Range("a" & CelSourceTest.Row & ":k" & CelSourceTest.Row).Copy
CelDestination.PasteSpecial (xlPasteValuesAndNumberFormats)
End If
Next |
d avance merci
Alex