Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Deleting every-other row in a spread sheet
I have a spreadsheet in excell that contains info imported from word. As a
result every-other row is blank. I would like to erase these empty rows so if anyone knows how to go about this it would be gratefully appreciated!! Thanks in advance Steve |
#2
|
|||
|
|||
Smintey,
If you a familiar with VBA, you can delete the rows via code. For example, this procedure deletes rows with empty cells in column A: Sub DeleteRows() Dim lLastRow As Long Dim Rng As Range Application.ScreenUpdating = False Rows(1).Insert Range("A1").Value = "Temp" With ActiveSheet .UsedRange lLastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row Set Rng = Range("A1", Cells(lLastRow, "A")) Rng.AutoFilter Field:=1, Criteria1:=" " Rng.SpecialCells(xlCellTypeVisible).EntireRow.Dele te .UsedRange End With End Sub "smintey" wrote: I have a spreadsheet in excell that contains info imported from word. As a result every-other row is blank. I would like to erase these empty rows so if anyone knows how to go about this it would be gratefully appreciated!! Thanks in advance Steve |
#3
|
|||
|
|||
If you sort them, the blanks will all go to the bottom.
If that option doesn't work for you, you can enter 0,1,0,1,0,1,0,... down an unused column, where the 1's correspond to the blank rows, then sort by this column, then delete the 1's at the bottom. I'm leading a FREE 1-hour online Webinar on Excel Tips & Tricks. Dec 16, Jan 14, Jan 27 from 4-5PM (each session is the same). If interested, go to http://www.iil.com, click on the yellow/orange "Try a free webinar" link on the left side, click the Microsoft Excel Tips & Tricks link, follow instructions to register. "smintey" wrote in message ... I have a spreadsheet in excell that contains info imported from word. As a result every-other row is blank. I would like to erase these empty rows so if anyone knows how to go about this it would be gratefully appreciated!! Thanks in advance Steve |
#4
|
|||
|
|||
Hi
Make a backup copy of your workbook first, then you could use something like For i = 20 To 2 Step -2 Rows(i & ":" & i).Select Selection.Delete Shift:=xlUp Next i Where 20 is the row number of the last blank row under the last data row and 2 is the first blank row under the first data row. Be sure to get the numbers right so you don't delete any data. HTH Ken |
#5
|
|||
|
|||
Hi smintey
You can also use Sort (DataSort) Select your data first -- Regards Ron de Bruin http://www.rondebruin.nl "smintey" wrote in message ... I have a spreadsheet in excell that contains info imported from word. As a result every-other row is blank. I would like to erase these empty rows so if anyone knows how to go about this it would be gratefully appreciated!! Thanks in advance Steve |
#6
|
|||
|
|||
Steve
Select a column. F5SpecialBlanks EditDeleteEntire Row Gord Dibben Excel MVP On Wed, 8 Dec 2004 07:27:01 -0800, "smintey" wrote: I have a spreadsheet in excell that contains info imported from word. As a result every-other row is blank. I would like to erase these empty rows so if anyone knows how to go about this it would be gratefully appreciated!! Thanks in advance Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linking to an Entire Sheet | Links and Linking in Excel | |||
Hyperlink to specific sheet in Excel Web File | Links and Linking in Excel | |||
Automatioc spill over data to a new Excel sheet from Xml source? | Excel Discussion (Misc queries) | |||
Sheet tabs disappear sometimes in Internet Explorer | Excel Discussion (Misc queries) | |||
Can't save chart as object in current sheet | Charts and Charting in Excel |