Bonjour,
Le fichier joint c'était juste un petit exemple pour simplifier, mais au niveau du document officiel il y'a 7 collones de 13 rang a insérer après la cellule rouge, avec une importante quantité de texte. Et pour l'instant ca bloque carrément le document =S j'ai rien pu améliorer au programme:
Public Sub idéesorange()
Dim Ws As Worksheet, Sh As Worksheet
Dim i As Long, j As Long
Dim Derligne As Long
Dim DerLig As Long, DerCol As Long
Application.ScreenUpdating = False
Set Ws = Worksheets("Idées à présenter")
Ws.Cells.Clear
Derligne = Ws.Range("A" & Rows.Count).End(xlUp).Row
For Each Sh In ActiveWorkbook.Worksheets
DerLig = Sh.Range("A" & Rows.Count).End(xlDown).Row
DerCol = Sh.Cells(1, Cells.Columns.Count).End(xlToLeft).Column
If Sh.Name <> Ws.Name And DerLig > 1 Then
With Sh
For i = 1 To DerLig
If .Cells(i, 1).Interior.ColorIndex = 40 Then
.Rows(i).Range("A1:L1").copy Destination:=Ws.Cells(Derligne, 1)
Ws.Cells(Derligne, DerCol + 0) = Sh.Name
Derligne = Ws.Range("A" & Rows.Count).End(xlUp).Row + 1
End If
Next i
End With
End If
Next Sh
With Ws
.Columns(2).Interior.ColorIndex = xlNone
End With
Set Ws = Nothing
Sheets("Idées à présenter").Select
End Sub