Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Deleting every other row?

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Deleting every other row?

a nice solution here

http://www.mcgimpsey.com/excel/deleteeverynthrow.html
"The Joe" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Deleting every other row?

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.

The Joe wrote:

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


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Deleting every other row?

On Feb 6, 1:33 pm, The Joe wrote:
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....


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
Deleting HTML form objects? GeorgeM Excel Discussion (Misc queries) 3 December 29th 06 11:24 PM
Deleting cell data without deleting formula Tom Hall Excel Discussion (Misc queries) 4 October 29th 06 04:07 PM
Deleting a worksheet but retaining values from the worksheet. [email protected] Excel Discussion (Misc queries) 1 September 13th 06 03:00 PM
Deleting a worksheet but retaining values from the worksheet. [email protected] Excel Discussion (Misc queries) 1 September 13th 06 02:48 PM
deleting values in a worksheet without deleting the formulas patti Excel Worksheet Functions 1 October 28th 05 09:49 PM


All times are GMT +1. The time now is 11:13 PM.

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"