A voir également:
- VBA aide pour débutant
- Logiciel de programmation pour débutant - Guide
- Logiciel montage vidéo débutant - Guide
- Excel compter cellule couleur sans vba - Guide
- Find vba - Astuces et Solutions
- Mkdir vba ✓ - Forum VB / VBA
2 réponses
Bonjour,
Je ferai qqch comme ceci :
Sub envoi_a_feuil2()
Dim Rng As Range
Dim cel As Range
For Each cel In Feuil1.UsedRange.Offset(, 1).Resize(, 1)
If cel.Value = "Non Joué" Then
cel.EntireRow.Copy Feuil2.Cells(Feuil2.Range("A65536").End(xlUp).Row + 1, 1)
If Rng Is Nothing Then
Set Rng = cel.EntireRow
Else
Set Rng = Union(Rng, cel.EntireRow)
End If
End If
Next cel
Rng.Select
Selection.Delete Shift:=xlUp
End Sub
Ce n'est pas testé, donc je ne te garanti pas que cela marche.
Je ferai qqch comme ceci :
Sub envoi_a_feuil2()
Dim Rng As Range
Dim cel As Range
For Each cel In Feuil1.UsedRange.Offset(, 1).Resize(, 1)
If cel.Value = "Non Joué" Then
cel.EntireRow.Copy Feuil2.Cells(Feuil2.Range("A65536").End(xlUp).Row + 1, 1)
If Rng Is Nothing Then
Set Rng = cel.EntireRow
Else
Set Rng = Union(Rng, cel.EntireRow)
End If
End If
Next cel
Rng.Select
Selection.Delete Shift:=xlUp
End Sub
Ce n'est pas testé, donc je ne te garanti pas que cela marche.
Voici mon code pour le moment:
Cela ne marche pas...ni le tiens
Private Sub CommandButton4_Click()
With Sheets("JOUE")
Dim Lign As Long, DrLig As Long
DrLig = .Columns(2).Find("*", , , , xlByColumns, xlPrevious).Row
For Lign = 4 To DrLig
If UCase(.Cells(Lign, 6)) = "MATCH JOUES" Then
Sheets("A JOUE").Range("b65536").End(xlUp).Offset(1, 0) = .Cells(Lign, 6).Value
End If
Next Lign
End With
End Sub
Cela ne marche pas...ni le tiens
Private Sub CommandButton4_Click()
With Sheets("JOUE")
Dim Lign As Long, DrLig As Long
DrLig = .Columns(2).Find("*", , , , xlByColumns, xlPrevious).Row
For Lign = 4 To DrLig
If UCase(.Cells(Lign, 6)) = "MATCH JOUES" Then
Sheets("A JOUE").Range("b65536").End(xlUp).Offset(1, 0) = .Cells(Lign, 6).Value
End If
Next Lign
End With
End Sub