Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
smintey
 
Posts: n/a
Default 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   Report Post  
John Mansfield
 
Posts: n/a
Default

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   Report Post  
Bob Umlas
 
Posts: n/a
Default

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   Report Post  
Ken Macksey
 
Posts: n/a
Default

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   Report Post  
Ron de Bruin
 
Posts: n/a
Default

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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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
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
Linking to an Entire Sheet Chaplain Doug Links and Linking in Excel 2 December 24th 04 07:39 AM
Hyperlink to specific sheet in Excel Web File jd17 Links and Linking in Excel 0 December 8th 04 09:03 PM
Automatioc spill over data to a new Excel sheet from Xml source? Sruthi Excel Discussion (Misc queries) 0 December 6th 04 06:31 PM
Sheet tabs disappear sometimes in Internet Explorer Jan Nordgreen Excel Discussion (Misc queries) 0 December 6th 04 01:34 AM
Can't save chart as object in current sheet Ann Scharpf Charts and Charting in Excel 1 December 3rd 04 11:24 PM


All times are GMT +1. The time now is 05:47 AM.

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"