ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Remove empty rows in excel? (https://www.excelbanter.com/excel-discussion-misc-queries/968-remove-empty-rows-excel.html)

Clbmgr

Remove empty rows in excel?
 
I have edited an excel worksheet by deleting rows of info. How do I get rid
of the empty rows

Ron de Bruin

Hi Clbmgr

You can't delete the rows, but you can hide them if you want
Select the rows and in the menubar

FormatRowHide

Or
Ctrl -


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


"Clbmgr" wrote in message ...
I have edited an excel worksheet by deleting rows of info. How do I get rid
of the empty rows




Don Guillett

Very OFTEN asked. Have you tried the archives?

--
Don Guillett
SalesAid Software

"Clbmgr" wrote in message
...
I have edited an excel worksheet by deleting rows of info. How do I get

rid
of the empty rows




Christopher Anderson

Try this macro:




Public Sub DeleteBlankRows()

Dim R As Long
Dim C As Range
Dim Rng As Range

On Error GoTo EndMacro
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

If Selection.Rows.Count 1 Then
Set Rng = Selection
Else
Set Rng = ActiveSheet.UsedRange.Rows
End If
For R = Rng.Rows.Count To 1 Step -1
If Application.WorksheetFunction.CountA(Rng.Rows(R).E ntireRow) = 0 Then
Rng.Rows(R).EntireRow.Delete
End If
Next R

EndMacro:

Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

End Sub



This will delete ALL completely blank rows in a workbook. If even one cell
contains info in the row it will not be deleted.

CHRISTOPHER

"Clbmgr" wrote:

I have edited an excel worksheet by deleting rows of info. How do I get rid
of the empty rows


Ron de Bruin

After reading CHRISTOPHER his answer I think i misunderstood you See this page
http://www.cpearson.com/excel/deleti...eleteBlankRows


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


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

You can't delete the rows, but you can hide them if you want
Select the rows and in the menubar

FormatRowHide

Or
Ctrl -


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


"Clbmgr" wrote in message ...
I have edited an excel worksheet by deleting rows of info. How do I get rid
of the empty rows






Gord Dibben

Do you mean you "cleared contents" on these rows and now you want to eliminate
the empty rows?

Select a column and F5SpecialBlanksOK

EditDeleteEntire Row

Gord Dibben Excel MVP

On Wed, 1 Dec 2004 12:17:02 -0800, Clbmgr
wrote:

I have edited an excel worksheet by deleting rows of info. How do I get rid
of the empty rows



Dave Peterson

Maybe you could just sort by a column that always has something in it if the row
is used.

Clbmgr wrote:

I have edited an excel worksheet by deleting rows of info. How do I get rid
of the empty rows


--

Dave Peterson


All times are GMT +1. The time now is 12:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com