Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Blank Rows Heather Excel Discussion (Misc queries) 9 July 15th 08 09:32 PM
How do I delete blank rows (rows alternate data, blank, data, etc ncochrax Excel Discussion (Misc queries) 2 June 27th 07 04:40 AM
Delete all blank rows... bourbon84 Excel Discussion (Misc queries) 2 October 4th 06 02:13 PM
delete blank rows Pam C Excel Discussion (Misc queries) 1 January 17th 06 07:13 PM
How to delete blank rows John Mansfield Excel Discussion (Misc queries) 3 April 27th 05 11:48 PM


All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"