Sub test()
'!!!!!-------macro à lancer depuis la feuille exploitée
Dim Sh1 As Worksheet, Sh2 As Worksheet, i&, n$
Set Sh1 = ActiveSheet
Workbooks.Add
Set Sh2 = ActiveSheet
Application.ScreenUpdating = False
Sh1.Cells.Copy Destination:=Sh2.Cells(1, 1)
For i = Sh2.Cells(Rows.Count, 3).End(xlUp).Row To 2 Step -1
If Sh2.Cells(i, 2) = "" Then
If Sh2.Cells(i, 4) = "" Then
Sh2.Cells(i, 1).EntireRow.Delete
End If
End If
Next i
For i = Sh2.Cells(Rows.Count, 3).End(xlUp).Row To 2 Step -1
If Sh2.Cells(i, 4) = "" Then
Sh2.Range(Sh2.Cells(i + 1, 3), Sh2.Cells(i + 1, 5)).Copy _
Destination:=Sh2.Range(Sh2.Cells(i, 3), Sh2.Cells(i, 5))
Sh2.Cells(i + 1, 1).EntireRow.Delete
End If
Next i
With Sh2.Range(Sh2.Cells(2, 1), Sh2.Cells(Rows.Count, Columns.Count))
.Interior.Pattern = xlNone
.Borders.LineStyle = xlNone
.Font.ColorIndex = xlAutomatic
End With
With Sh2.Range(Sh2.Cells(2, 1), Sh2.Cells(Sh2.Cells(Rows.Count, 1).End(xlUp).Row, Sh2.Cells(1, Columns.Count).End(xlToLeft).Column))
.Borders.LineStyle = xlContinuous
End With
Sh2.Columns.AutoFit
Application.ScreenUpdating = True
n = Application.GetSaveAsFilename
End Sub