Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
delete blank rows with functions
I have blank rows that I want to remove from the worksheet, i use the
following code to do that, but it does not delete the rows in which the cells of the row have a function. I have a function that returns a value, if it does not return the value it is blank. Public Sub DeleteBlankRows() On Error Resume Next Columns(2).SpecialCells(xlCellTypeBlanks).EntireRo w.Delete On Error GoTo 0 End Sub I would like to know if there is a way to delete those rows with the blank functions? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
delete blank rows with functions
Hi daphoenix
You can loop and test for "" http://www.rondebruin.nl/delete.htm See the examples below the first macro You can use If .Value = "" Then .EntireRow.Delete 'This will delete each row if the cell is empty or have a formula that evaluates to "" Or use EasyFilter There is a option in the add-in to filter for "" and delete the rows http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "daphoenix" wrote in message ... I have blank rows that I want to remove from the worksheet, i use the following code to do that, but it does not delete the rows in which the cells of the row have a function. I have a function that returns a value, if it does not return the value it is blank. Public Sub DeleteBlankRows() On Error Resume Next Columns(2).SpecialCells(xlCellTypeBlanks).EntireRo w.Delete On Error GoTo 0 End Sub I would like to know if there is a way to delete those rows with the blank functions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Blank Rows | Excel Discussion (Misc queries) | |||
How do I delete blank rows (rows alternate data, blank, data, etc | Excel Discussion (Misc queries) | |||
Delete all blank rows... | Excel Discussion (Misc queries) | |||
delete blank rows | Excel Discussion (Misc queries) | |||
How to delete blank rows | Excel Discussion (Misc queries) |