Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jdf5
 
Posts: n/a
Default Is there a easy way to delete blank lines to clean up worksheets?

I have a workbook that break down a list of accounts based on differ factors
& then puts them onto different worksheets. After it does this is leaves
blank lines on the worksheets. Is there an easy way to delete the blank
lines?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron de Bruin
 
Posts: n/a
Default Is there a easy way to delete blank lines to clean up worksheets?

Hi jdf5

Can you test one column for blanks ?
http://www.rondebruin.nl/specialcells.htm


Or must you check whole rows ?
http://www.rondebruin.nl/delete.htm

Use this then in the code example

You must replace this five lines with the example below you want to use.

If IsError(.Cells(Lrow, "A").Value) Then
'Do nothing, This avoid a error if there is a error in the cell
ElseIf .Cells(Lrow, "A").Value = "ron" Then .Rows(Lrow).Delete
'This will delete each row with the Value "ron" in Column A, case sensitive.
End If


If Application.CountA(.Rows(Lrow)) = 0 Then .Rows(Lrow).Delete
'This will delete the row if the whole row is empty (all columns)



--
Regards Ron De Bruin
http://www.rondebruin.nl



"jdf5" wrote in message ...
I have a workbook that break down a list of accounts based on differ factors
& then puts them onto different worksheets. After it does this is leaves
blank lines on the worksheets. Is there an easy way to delete the blank
lines?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron de Bruin
 
Posts: n/a
Default Is there a easy way to delete blank lines to clean up worksheets?

Btw : manual you can select the column that you want to check and use
F5Special
Blanks
Ctrl -
Choose entire row





--
Regards Ron De Bruin
http://www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi jdf5

Can you test one column for blanks ?
http://www.rondebruin.nl/specialcells.htm


Or must you check whole rows ?
http://www.rondebruin.nl/delete.htm

Use this then in the code example

You must replace this five lines with the example below you want to use.

If IsError(.Cells(Lrow, "A").Value) Then
'Do nothing, This avoid a error if there is a error in the cell
ElseIf .Cells(Lrow, "A").Value = "ron" Then .Rows(Lrow).Delete
'This will delete each row with the Value "ron" in Column A, case sensitive.
End If


If Application.CountA(.Rows(Lrow)) = 0 Then .Rows(Lrow).Delete
'This will delete the row if the whole row is empty (all columns)



--
Regards Ron De Bruin
http://www.rondebruin.nl



"jdf5" wrote in message ...
I have a workbook that break down a list of accounts based on differ factors
& then puts them onto different worksheets. After it does this is leaves
blank lines on the worksheets. Is there an easy way to delete the blank
lines?





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
Add or Delete Rows in Protected worksheets NH Excel Discussion (Misc queries) 0 March 16th 06 05:15 PM
How can I delete a row from all worksheets in a workbook easily? Tom Excel Worksheet Functions 1 March 9th 06 02:19 PM
how do I print grid lines for blank rows gailrolfe Excel Discussion (Misc queries) 3 February 25th 05 05:22 AM
how do I print grid lines for blank rows calrolfe Excel Discussion (Misc queries) 0 February 24th 05 07:33 PM
How do I delete filtered lines in Excel 2000? Nicola H Excel Worksheet Functions 1 February 8th 05 03:47 PM


All times are GMT +1. The time now is 04:33 AM.

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

About Us

"It's about Microsoft Excel"