Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Excel (Eliminate blank rows)

in a worksheet is there way to automatically elimate all the blank rows in a
selected range
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Excel (Eliminate blank rows)

Try this:

Select the range

Press the [F5] key....that's the shortcut for <edit<go to
[alt] S.......to select the [special] button
Press the [K] key....to check: Blanks
Press [enter]

Now all the blank cells are selected

[alt] E.......for the Edit menu
[D] ...........for delete
[R]............for entire rows
Press [enter]

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"midawson" wrote:

in a worksheet is there way to automatically elimate all the blank rows in a
selected range

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Excel (Eliminate blank rows)

In column A, select the rows you want to process and then run:

Sub delete_empty_rows()

Dim r As Range, j As Long

Set r = ActiveSheet.UsedRange
j = r.Rows.Count + r.Row
Set rdel = Cells(j, "A")

i = Selection.Cells(1, 1).Row
j = Selection.Offset(Selection.Count - 1, 0).Row

For i = 1 To j
If Application.WorksheetFunction.CountA(Rows(i)) = 0 Then
Set rdel = Union(rdel, Cells(i, "A"))
End If
Next

rdel.EntireRow.Delete

End Sub
--
Gary's Student
gsnu200705


"midawson" wrote:

in a worksheet is there way to automatically elimate all the blank rows in a
selected range

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Macro needed for inserting blank rows sunslight Excel Worksheet Functions 2 January 12th 07 05:58 PM
How do I do numbering of rows in Excel when there are blank rows? V Excel Discussion (Misc queries) 1 April 3rd 06 11:24 AM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
How do I remove blank rows in Excel? m28leics Excel Discussion (Misc queries) 2 November 29th 04 11:56 PM


All times are GMT +1. The time now is 04:34 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"