sub efface()
dim cel as range, i as long
Range("G1:G" & Range("G65536").End(xlUp).Row).Cells.SpecialCells(xlCellTypeBlanks).Select
if selection.cells.count<2 then msgbox "Pas de suppression" : exit sub
For i = Selection.Cells.Count To 1 Step -1
Set cel = Selection(i)
If cel.Offset(0, 1) = "" Then cel.EntireRow.Delete
Next i
end sub
Public Sub supp()
Dim curSheet As Excel.Worksheet
Dim derLigne As Integer
Dim i As Integer
For Each curSheet In ThisWorkbook.Worksheets
'la colonne "A" sert à trouver la dernière ligne.
'il faut donc qu'elle soit toujours complétée
derLigne = curSheet.Range("A" & curSheet.Rows.Count).End(xlUp).Row
For i = derLigne To 1 Step -1
If (curSheet.Range("G" & i).Value = "") And (curSheet.Range("H" & i).Value = "") Then
curSheet.Rows(i).Delete
End If
Next
Next curSheet
End Sub
Sub efface()
Dim cel As Range, i As Long, adr As String
Range("G1:G" & Range("G65536").End(xlUp).Row).Cells.SpecialCells(xlCellTypeBlanks).Select
If Selection.Cells.Count < 2 Then MsgBox "Pas de suppression": Exit Sub
adr = ""
For Each cel In Selection
If cel.Offset(0, 1) = "" Then
If adr = "" Then
adr = cel.Address
Else
adr = adr & "," & cel.Address
End If
End If
Next
if adr>"" then Range(adr).EntireRow.Delete
End Sub
Sub efface()
Dim cel As Range, i As Long, adr As String
Range("G1:G" & Range("G65536").End(xlUp).Row).Cells.SpecialCells(xlCellTypeBlanks).Select
If Selection.Cells.Count < 2 Then MsgBox "Pas de suppression": Exit Sub
Selection.Offset(0, 1).Cells.SpecialCells(xlCellTypeBlanks).Select
If Selection.Cells.Count > 0 Then Selection.EntireRow.Delete
End Sub