Vba excel: copier les lignes de couleur. [Résolu/Fermé]
A voir également:
- Vba excel: copier les lignes de couleur.
- Vba excel: copier les lignes de couleur. ✓ - Forum - Excel
- VBA excel insertion de ligne et couleur ✓ - Forum - VB / VBA
- VBA Excel:Copier/coller ligne+nom de feuille ds autre feuille ✓ - Forum - VB / VBA
- VBA Excel - Copier des lignes si condition ✓ - Forum - VB / VBA
- Vba excel copier lignes avec condition ✓ - Forum - VB / VBA
3 réponses
eriiic
- Messages postés
- 23813
- Date d'inscription
- mardi 11 septembre 2007
- Statut
- Contributeur
- Dernière intervention
- 24 janvier 2021
Bonjour,
essaie avec
.Range(.Cells(z, 1), .Cells(z, 18)).Copy Sheets("Feuil2").Range("A30000").End(xlUp).offset(1,0)
(non testé)
eric
essaie avec
.Range(.Cells(z, 1), .Cells(z, 18)).Copy Sheets("Feuil2").Range("A30000").End(xlUp).offset(1,0)
(non testé)
eric
Signaler
Clairette
Merci beaucoup, ca marche !!! Bonne soirée à toi et merci beaucoup !!!
Gianlica
Cela devrait fonctionner :
Private Sub CommandButton1_Click()
Dim z As Long
For z = 2 To Sheets("Feuil1").Range("B30000").End(xlUp).Row
With Sheets("Feuil1")
If .Cells(z, 16).Interior.ColorIndex <> 34 Then
.Range(.Cells(z, 1), .Cells(z, 18)).Copy Sheets("Feuil2").Range("A30000").End(xlUp).Row
End If
End With
Next z
End Sub
Private Sub CommandButton1_Click()
Dim z As Long
For z = 2 To Sheets("Feuil1").Range("B30000").End(xlUp).Row
With Sheets("Feuil1")
If .Cells(z, 16).Interior.ColorIndex <> 34 Then
.Range(.Cells(z, 1), .Cells(z, 18)).Copy Sheets("Feuil2").Range("A30000").End(xlUp).Row
End If
End With
Next z
End Sub