Vous utilisez un navigateur obsolète. Il se peut que ce site ou d'autres sites Web ne s'affichent pas correctement. Vous devez le mettre à jour ou utiliser un navigateur alternatif.
Boostez vos compétences Excel avec notre communauté !
Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force.
Apprenez, échangez, progressez – et tout ça gratuitement !
👉 Inscrivez-vous maintenant !
Sub Transfert()
Application.ScreenUpdating = False
Range("G2:L" & Range("G65535").End(xlUp).Row + 1).ClearFormats
Range("G2:L" & Range("G65535").End(xlUp).Row + 1).ClearContents
Dim cel As Range
For Each cel In Range("B2:B" & Range("B65535").End(xlUp).Row)
If cel.Interior.ColorIndex = 4 Then
Range(Cells(cel.Row, 1), Cells(cel.Row, 3)).Copy
Range("G" & Range("G65535").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End If
Next cel
[F2].Select
Application.ScreenUpdating = True
End Sub
j ai reussi sous une forme
Sub SansCouleur()
Application.ScreenUpdating = False
Range("G2:L" & Range("G65535").End(xlUp).Row + 1).ClearFormats
Range("G2:L" & Range("G65535").End(xlUp).Row + 1).ClearContents
Dim cel As Range
For Each cel In Range("B2:B" & Range("B65535").End(xlUp).Row)
If cel.Interior.ColorIndex = -4142 Then
Range(Cells(cel.Row, 1), Cells(cel.Row, 5)).Copy
Range("G" & Range("G65535").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End If
Next cel
[F2].Select
Application.ScreenUpdating = True
End Sub
attention Si... la macro est lancée d'une autre feuille. J'avais :
Code:
Sub copie()
Dim L As Long
With Sheets("Feuil1")
For L = 2 To .Cells(Rows.Count, 2).End(xlUp).Row
If .Cells(L, 2).Interior.ColorIndex = xlNone Then
.Cells(L, 1).Resize(1, 3).Copy .Cells(.Cells(Rows.Count, 7).End(xlUp).Row + 1, 7)
End If
Next
End With
End Sub
@phlaurent55 : -4142 c'est Xlnone !
@reve24 : combien de colonnes faut-il copier ?
- Navigue sans publicité - Accède à Cléa, notre assistante IA experte Excel... et pas que... - Profite de fonctionnalités exclusives Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel. Je deviens Supporter XLD