Deleting every other row?

G

Guest

I have a 25000 line spreadhseet and I need to delete every other row of it.
Is there a way to do so without manually deleting every row (12500 lines!!!).
Thanks
 
D

Dave Peterson

I would insert a new column A into the worksheet.

Then select A1:A25000
And type this formula (with a1 the active cell)
=MOD(ROW(),2)
But hit ctrl-enter to enter the formula in all the selected cells.

Then with A1:A25000 still selected
edit|copy
edit|paste special|values

Sort all the data by that column.

And delete the 12500 rows you don't want--either 0's or 1's in those cells.

Then delete column A.
 
G

georgeswebmail

I have a 25000 line spreadhseet and I need to delete every other row of it.
Is there a way to do so without manually deleting every row (12500 lines!!!).
Thanks

I think this is simpler than a macro...you can use it for multiple
things..

Insert a column to the left of the data
Type a number 1 to the left of the data on the first row (in the new column)
Fill the column with consectuve numbers using data fill (highlight first row and second row-the blank row,
and then drag the little box in the botton of the area highlighted to
the end of the sheet).
This will product a column of consecutive numbers but on alternating
rows.
Sort the data (including the new column)
The blank rows will all be in the same area of the sheet
delete the blank rows
delete the new column
This will insure that your data is in the same order as previously.

Hope this helps....
 

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

Similar Threads


Top