Deleting blank lines between data lines

P

Phenom

Hi Everyone!

I have a worksheet with about 2,000 lines of data. The problem is tha
every other line is blank. I cannot sort here because some
information is carried over to the third line.

1 data 1a
2 blank -->
3 data 1b
4 blank -->
5 data 2

How can I eliminate just the blank lines and maintain the order
that the data list is currently in?

Thanks! :
 
D

Dan E

Phenom,

One method that may help you.

Say you had data in rows 1, 3, 5, 7 etc...

In a blank column ie Z put the following
Z1 = 1, Z3 = 2
Select Cells Z1:Z4, and drag down. You should get
Z5 = 3, Z7 = 4, Z9 = 5, etc...

Select all of your data including your new column
From the menu select Data -> Sort
in the Sort By column choose Column Z and Ascending
Hit OK

Delete Column Z

At this point you may want to scroll to the bottom of your
data select all of the blank rows from that point up and
choose Edit -> Delete. Even though they contain no data
excel may still think their part of the used range.

Dan E
 
P

Peo Sjoblom

Select the range, press F5, select special and blanks, do edit>delete and
select entire row
 
D

Don Guillett

try this
Sub delblanks()
With Selection
..SpecialCells(xlBlanks).EntireRow.Delete
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top