Excel: Delete row if cell in certain column is blank?

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Excel: Delete row if cell in certain column is blank?

Message par Clippy »

Excel: Delete row if cell in certain column is blank?
Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Re: Excel: Delete row if cell in certain column is blank?

Message par Clippy »

You can do this very quickly if the cells are truly blank using `SpecialCells`

**Manual**

- Select Column C

- Press `F5`, then `Special`

- Check `Blanks`, then `OK` (see this step in the pic at bottom)

- Delete the rows that are now selected (e.g. right click in selection > *Delete cells...* > *Entire row* or via the ribbon (see second screenshot))

**VBA**

`Sub QuickCull()
On Error Resume Next
Columns("C").SpecialCells(xlBlanks).EntireRow.Delete
End Sub

```
Répondre

Revenir à « Excel & VBA »