Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default automate delete rows without data

It is tediious to manually delete rows that are empty and I was wondering if
there was a way to automatically delete empty rows either by using a function
or creating a macro or if there was any other easier solution.
Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default automate delete rows without data



"Amir" wrote:

It is tediious to manually delete rows that are empty and I was wondering if
there was a way to automatically delete empty rows either by using a function
or creating a macro or if there was any other easier solution.
Thank you.


Found something from John James...
Works great...Thanks John...

If you want to delete blank rows on your datasheet, here's a routine
which does this:

Sub DeleteEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub

If your formulae are slowing down your worksheet, then maybe try
getting the same result but without formulae. For instance if you
filter your data on your datasheet, then you'll be able to copy the
filtered range onto another sheet. If this meets your needs, you could
look at attaching this filter & paste process to a macro/button.


--
John James
------------------------------------------------------------------------
John James's Profile:
http://www.excelforum.com/member.php...o&userid=32690
View this thread: http://www.excelforum.com/showthread...hreadid=532460



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Xt Xt is offline
external usenet poster
 
Posts: 49
Default automate delete rows without data

On Aug 19, 4:21*pm, Amir wrote:
"Amir" wrote:
It is tediious to manually delete rows that are empty and I was wondering if
there was a way to automatically delete empty rows either by using a function
or creating a macro or if there was any other easier solution.
Thank you.


Found something from John James...
Works great...Thanks John...

If you want to delete blank rows on your datasheet, here's a routine
which does this:

Sub DeleteEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub

If your formulae are slowing down your worksheet, then maybe try
getting the same result but without formulae. *For instance if you
filter your data on your datasheet, then you'll be able to copy the
filtered range onto another sheet. *If this meets your needs, you could
look at attaching this filter & paste process to a macro/button.

--
John James
------------------------------------------------------------------------
John James's Profile:http://www.excelforum.com/member.php...o&userid=32690
View this thread:http://www.excelforum.com/showthread...hreadid=532460


For a non macro way, you can put in a new index column and put 1 and 2
in the top two cells. Fill down to the bottom of the data. Sort
everything on another column. All the blanks go together at the
bottom. Delete them all at once. Sort on the index column. and
delete it.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default automate delete rows without data

You could select a column and F5SpecialBlanksOK

EditDeleteEntire Row


Gord Dibben MS Excel MVP

On Tue, 18 Aug 2009 20:44:01 -0700, Amir
wrote:

It is tediious to manually delete rows that are empty and I was wondering if
there was a way to automatically delete empty rows either by using a function
or creating a macro or if there was any other easier solution.
Thank you.


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
How do I identify matching rows of data and delete them both? WMark Excel Discussion (Misc queries) 4 October 17th 08 01:43 PM
Delete specific rows of data Roger Bell New Users to Excel 3 June 19th 07 08:40 AM
How do I delete all rows that contain no red highlighted data? Linda Hudock Excel Discussion (Misc queries) 7 May 22nd 06 09:09 AM
Delete rows with no data Mindie Setting up and Configuration of Excel 1 November 30th 05 09:24 PM
Macro to delete rows with same data Connie Martin Excel Worksheet Functions 12 November 22nd 05 01:18 PM


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