Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
tom tom is offline
external usenet poster
 
Posts: 570
Default Deleting/removing unused rows in a worksheet

Excel 2007 all MS updates
Is it possible to delete rows without ANY data automatically? Currently, I
have a 2000+ row spreadsheet that has 250+ blank rows. Instead of doing this
manually, how can the removal or deletion (squishing!) of the blank rows be
done? For example, say I have a spreadsheet with data in rows 1, 2,4,6,8 and
12. All I really need are THESE rows with data. I want to squish,
eliminate, delete the rows in 3,5,7,9,10,11.
How can I do this by 'highlighting' or whatever the entire set (rows 1-12
above) and then performing an "delete empty row" process?
TIA
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Deleting/removing unused rows in a worksheet

If you are interested in macros try out the below macro. If you are new to
macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()


Sub DeleteRows()
Dim lngRow As Long, lngLastRow As Long
lngLastRow = ActiveSheet.Cells.Find(What:="*", _
SearchDirection:=xlPrevious, SearchOrder:=xlRows).Row
For lngRow = lngLastRow To 1 Step -1
If WorksheetFunction.CountBlank(Rows(lngRow)) = Columns.Count _
Then Rows(lngRow).Delete
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Tom" wrote:

Excel 2007 all MS updates
Is it possible to delete rows without ANY data automatically? Currently, I
have a 2000+ row spreadsheet that has 250+ blank rows. Instead of doing this
manually, how can the removal or deletion (squishing!) of the blank rows be
done? For example, say I have a spreadsheet with data in rows 1, 2,4,6,8 and
12. All I really need are THESE rows with data. I want to squish,
eliminate, delete the rows in 3,5,7,9,10,11.
How can I do this by 'highlighting' or whatever the entire set (rows 1-12
above) and then performing an "delete empty row" process?
TIA

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Deleting/removing unused rows in a worksheet

You can install and run this short macro. (Bring up VBE using Alt+F11, Insert
- Module, paste this in)

Sub Cleanup()
For i = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Row _
To 1 Step -1
If WorksheetFunction.CountA(Range(Cells(i, 1), Cells(i, 256))) = 0 Then
ActiveSheet.Rows(i).Delete
End If
Next
End Sub

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Tom" wrote:

Excel 2007 all MS updates
Is it possible to delete rows without ANY data automatically? Currently, I
have a 2000+ row spreadsheet that has 250+ blank rows. Instead of doing this
manually, how can the removal or deletion (squishing!) of the blank rows be
done? For example, say I have a spreadsheet with data in rows 1, 2,4,6,8 and
12. All I really need are THESE rows with data. I want to squish,
eliminate, delete the rows in 3,5,7,9,10,11.
How can I do this by 'highlighting' or whatever the entire set (rows 1-12
above) and then performing an "delete empty row" process?
TIA

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Deleting/removing unused rows in a worksheet

Select a column and F5SpecialBlanksOK

EditDeleteEntire Row.

Record a macro whilst doing this.


Gord Dibben MS Excel MVP

On Wed, 25 Nov 2009 05:20:01 -0800, Tom
wrote:

Excel 2007 all MS updates
Is it possible to delete rows without ANY data automatically? Currently, I
have a 2000+ row spreadsheet that has 250+ blank rows. Instead of doing this
manually, how can the removal or deletion (squishing!) of the blank rows be
done? For example, say I have a spreadsheet with data in rows 1, 2,4,6,8 and
12. All I really need are THESE rows with data. I want to squish,
eliminate, delete the rows in 3,5,7,9,10,11.
How can I do this by 'highlighting' or whatever the entire set (rows 1-12
above) and then performing an "delete empty row" process?
TIA


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
removing specific rows in a worksheet Louise Excel Discussion (Misc queries) 9 January 22nd 09 05:50 PM
Subtotals Deleting Rows after removing Subtotal - 2003 Excel Raul[_2_] Excel Worksheet Functions 1 October 2nd 07 06:28 PM
deleting unused space at the end of a worksheet beckyz Excel Worksheet Functions 3 October 9th 06 08:21 PM
Deleting unused columns dramajuana Excel Discussion (Misc queries) 2 June 11th 06 12:14 AM
Removing unused or blank rows and columns Mark F Excel Discussion (Misc queries) 2 December 23rd 04 02:39 AM


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