I would like to write a macro to delete rows if a cell in column b is blank. Thanks in advance.
M mja Jul 13, 2006 #1 I would like to write a macro to delete rows if a cell in column b is blank. Thanks in advance.
R Ron de Bruin Jul 13, 2006 #2 Hi mja See http://www.rondebruin.nl/delete.htm This can be very fast Sub DeleteBlankRows_1() 'This macro delete all rows with a blank cell in column A On Error Resume Next 'In case there are no blank cells Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete On Error GoTo 0 End Sub Warning Read this http://www.rondebruin.nl/specialcells.htm
Hi mja See http://www.rondebruin.nl/delete.htm This can be very fast Sub DeleteBlankRows_1() 'This macro delete all rows with a blank cell in column A On Error Resume Next 'In case there are no blank cells Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete On Error GoTo 0 End Sub Warning Read this http://www.rondebruin.nl/specialcells.htm