Bonsoir le forum, ayant adapté une macro trouvée sur le forum, qui sert a supprimer une ligne si des cellules de cette meme ligne sont vides.
Dans mon cas, supprimer la ligne si les cellules sont vides de la colonne B à AG
Comment simplifier mon code????
Merci d'avance
@micalement
' suppression lignes si colonnes B à AG sont vides
Dim j As Integer
For j = Range('A65536').End(xlUp).Row To 1 Step -1
If Cells(j, 2).Value = '' And Cells(j, 3).Value = '' And Cells(j, 4).Value = '' And Cells(j, 5).Value = '' And Cells(j, 6).Value = '' And Cells(j, 7).Value = '' And Cells(j, 8).Value = '' And Cells(j, 9).Value = '' And Cells(j, 10).Value = '' And Cells(j, 11).Value = '' And Cells(j, 12).Value = '' And Cells(j, 13).Value = '' And Cells(j, 14).Value = '' And Cells(j, 15).Value = '' And Cells(j, 16).Value = '' And Cells(j, 17).Value = '' And Cells(j, 18).Value = '' And Cells(j, 19).Value = '' And Cells(j, 20).Value = '' And Cells(j, 21).Value = '' And Cells(j, 22).Value = '' And Cells(j, 23).Value = '' And Cells(j, 24).Value = '' And Cells(j, 25).Value = '' And Cells(j, 26).Value = '' And Cells(j, 27).Value = '' And Cells(j, 28).Value = '' And Cells(j, 29).Value = '' And Cells(j, 30).Value = '' And Cells(j, 31).Value = '' And Cells(j, 32).Value = '' And Cells(j, 33).Value = '' Then
Rows(j).Delete
End If
Next j
Dans mon cas, supprimer la ligne si les cellules sont vides de la colonne B à AG
Comment simplifier mon code????
Merci d'avance
@micalement
' suppression lignes si colonnes B à AG sont vides
Dim j As Integer
For j = Range('A65536').End(xlUp).Row To 1 Step -1
If Cells(j, 2).Value = '' And Cells(j, 3).Value = '' And Cells(j, 4).Value = '' And Cells(j, 5).Value = '' And Cells(j, 6).Value = '' And Cells(j, 7).Value = '' And Cells(j, 8).Value = '' And Cells(j, 9).Value = '' And Cells(j, 10).Value = '' And Cells(j, 11).Value = '' And Cells(j, 12).Value = '' And Cells(j, 13).Value = '' And Cells(j, 14).Value = '' And Cells(j, 15).Value = '' And Cells(j, 16).Value = '' And Cells(j, 17).Value = '' And Cells(j, 18).Value = '' And Cells(j, 19).Value = '' And Cells(j, 20).Value = '' And Cells(j, 21).Value = '' And Cells(j, 22).Value = '' And Cells(j, 23).Value = '' And Cells(j, 24).Value = '' And Cells(j, 25).Value = '' And Cells(j, 26).Value = '' And Cells(j, 27).Value = '' And Cells(j, 28).Value = '' And Cells(j, 29).Value = '' And Cells(j, 30).Value = '' And Cells(j, 31).Value = '' And Cells(j, 32).Value = '' And Cells(j, 33).Value = '' Then
Rows(j).Delete
End If
Next j