Re : Liste bon avec vba
Re
OUI c est ce que je fais maintenant j essaye de comprendre ta macro
j ai modele un deusieme code pour une nouvelle fonction le voila
Sub ab()
Dim derArt&, rngV As Range, X&, i, col, Dlg&, f As Worksheet
Set f = Sheets("Bon Liv")
derArt = f.Cells(Rows.Count, "M").End(xlUp).Row
col = Array("D", "H", "E", "F", "G", "I")
Set rngV = f.Range(Cells(7, "M"), f.Cells(derArt, "R")): X = rngV.Rows.Count
With Sheets("Encaissmt")
Dlg = .Cells(Rows.Count, "A").End(xlUp).Row + 1
For i = 1 To 6
.Cells(Dlg, col(i - 1)).Resize(X).Value = rngV.Item(i).Resize(derArt - 6).Value
Next i
.Cells(Dlg, 1).Resize(X) = f.[M4]: .Cells(Dlg, 2).Resize(X) = f.[P4]: .Cells(Dlg, 3).Resize(X) = f.[R4]
End WithEnd Sub
j ai eu dans la feuille "Encaissmt" deux fois copie le Nom , la Date ET le N° bon .l une sous l autre et pour les autres cellules c est bon .
tu peux savoir ou est l erreur [TABLE="width: 909"]
[TR]
[TD]NON[/TD]
[TD]DATE[/TD]
[TD]N° BON[/TD]
[TD]Mode[/TD]
[TD]Bnq[/TD]
[TD]N°[/TD]
[TD]tireur[/TD]
[TD]Echeance[/TD]
[TD]Montant[/TD]
[TD]Remise[/TD]
[/TR]
[TR]
[TD]DIVERS[/TD]
[TD]01/01/2014[/TD]
[TD]1/1C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]DIVERS[/TD]
[TD]01/01/2014[/TD]
[TD]1/1C[/TD]
[TD]ESP[/TD]
[TD]123[/TD]
[TD]TEST[/TD]
[TD]01/01/2014[/TD]
[TD]CA[/TD]
[TD]1000[/TD]
[TD] [/TD]
[/TR]
[/TABLE]