Bonjour,
Donc si j'ai bien compris si une des cellules est vide quelque soit la colonne comprise entre A et G, on supprime la ligne.
Avec l'éditeur vba (Alt F11) créez un module et placez y ce code.
Option Explicit
Sub test()
Dim DerLigne, i, j As Long
Application.ScreenUpdating = False
With Sheets("Nombre de voiture vendue")
For i = 1 To 7
DerLigne = .Columns(i).Find("*", , , , xlByColumns, xlPrevious).Row + 1
For j = 2 To DerLigne
If .Cells(j, i) = "" Then
.Range("A" & j & ":G" & j).Delete Shift:=xlUp
End If
Next j
Next i
End With
With Sheets("Nombre de voiture dans la rue")
For i = 1 To 7
DerLigne = .Columns(i).Find("*", , , , xlByColumns, xlPrevious).Row + 1
For j = 2 To DerLigne
If .Cells(j, i) = "" Then
.Range("A" & j & ":G" & j).Delete Shift:=xlUp
End If
Next j
Next i
End With
Application.ScreenUpdating = True
End Sub
Autre solution plus courte, si vous êtes sûre que vos feuilles reste en 1ère et 2ème position :
Sub test2()
Dim DerLigne, i, j, k As Long
Application.ScreenUpdating = False
For k = 1 To 2
With Sheets(k)
For i = 1 To 7
DerLigne = .Columns(i).Find("*", , , , xlByColumns, xlPrevious).Row + 1
For j = 2 To DerLigne
If .Cells(j, i) = "" Then
.Range("A" & j & ":G" & j).Delete Shift:=xlUp
End If
Next j
Next i
End With
Next k
Application.ScreenUpdating = True
End Sub