Re,
Dans le fichhier que je t'avais proposé, mets remplace ma macropar celle-ci :
Sub transfert()
'Macro par Dan pour thamaloux le 10/02/08 pour Excel pratique
Dim H As Integer, S As Integer, D As Integer
Dim ws As String
Dim i As Byte
Application.ScreenUpdating = False
ws = "tableau general"
H = 8
S = 8
D = 8
With Sheets(ws)
For Each cel In .Range("E8", Range("E65536").End(xlUp))
Select Case cel
Case Is = "H"
With Sheets("H")
.Cells(H, 1) = Sheets(ws).Cells(cel.Row, 1)
.Cells(H, 2) = Sheets(ws).Cells(cel.Row, 2)
.Cells(H, 3) = Sheets(ws).Cells(cel.Row, 3)
.Cells(H, 4) = Sheets(ws).Cells(cel.Row, 4)
i = 6
Do While i <= Sheets(ws).UsedRange.Columns.Count
If Sheets(ws).Cells(cel.Row, i).Value > 0 Then .Cells(H, i) = Sheets(ws).Cells(cel.Row, i)
i = i + 1
Loop
End With
H = H + 1
Case Is = "S"
With Sheets("S")
.Cells(S, 1) = Sheets(ws).Cells(cel.Row, 1)
.Cells(S, 2) = Sheets(ws).Cells(cel.Row, 2)
.Cells(S, 3) = Sheets(ws).Cells(cel.Row, 3)
.Cells(S, 4) = Sheets(ws).Cells(cel.Row, 4)
i = 6
Do While i <= Sheets(ws).UsedRange.Columns.Count
If Sheets(ws).Cells(cel.Row, i).Value > 0 Then .Cells(S, i) = Sheets(ws).Cells(cel.Row, i)
i = i + 1
Loop
End With
S = S + 1
Case Is = "D"
With Sheets("D")
.Cells(D, 1) = Sheets(ws).Cells(cel.Row, 1)
.Cells(D, 2) = Sheets(ws).Cells(cel.Row, 2)
.Cells(D, 3) = Sheets(ws).Cells(cel.Row, 3)
.Cells(D, 4) = Sheets(ws).Cells(cel.Row, 4)
i = 6
Do While i <= Sheets(ws).UsedRange.Columns.Count
If Sheets(ws).Cells(cel.Row, i).Value > 0 Then .Cells(D, i) = Sheets(ws).Cells(cel.Row, i)
i = i + 1
Loop
End With
D = D + 1
End Select
Next
End With
End Sub
Attention, on commence sur la ligne 8 de chaque feuille.
Amicalement
Dan
NB : Ne vois rien de mal à cela mais évite de mettre des fichiers qui ne font qu'alourdir le forum si tu peux t'expliquer par écrit.