Bonjour,
une autre approche :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Sub Demo()
Dim Rd As Range, Rf As Range
L& = [A4].CurrentRegion.Rows.Count + 3
R& = 5
Application.ScreenUpdating = False
[G4].CurrentRegion.Clear
[A4:C4].Copy [H4]
Set Rd = [A5]
Do Until Rd.Row > L
Set Rf = Rd.End(xlDown)
If Rf(2, 2) Like "Total *" Then
N& = Rf.Row - Rd.Row + 1
Cells(R, 7).Resize(N).Value = Mid(Rf(2, 2).Value, 7)
Rd.Resize(N, 3).Copy Cells(R, 8)
R = R + N
End If
Set Rd = Rf.End(xlDown)
Loop
Set Rd = Nothing: Set Rf = Nothing
With [G4].CurrentRegion.Columns
.Item(1).AutoFit
.Item(2).HorizontalAlignment = xlCenter
End With
Application.ScreenUpdating = True
End Sub |
______________________________________________________________________________________________________
Merci de cliquer sur

pour chaque message ayant aidé puis sur

pour clore cette discussion …
______________________________________________________________________________________________________
Je suis Paris, Charlie, …
Partager