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
19 mai 2010 à 17:22
- Messages postés
- 24408
- Date d'inscription
- mardi 11 septembre 2007
- Statut
- Contributeur
- Dernière intervention
- 23 juin 2022
19 mai 2010 à 17:22
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
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
19 mai 2010 à 17:25