Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default is there a way to delete alternate rows in excel

I have a table generated by a datalog program running for about 7 days.
Unfortunately the log interval was inadvertantly set to 5 instead of 30
seconds, & the data now extends over 2 text files, each of about 65000 lines,
close to the Excel 2003 limit. Can anyone advise a simple way to delete
alternate rows, either in the text file or in the excel file?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default is there a way to delete alternate rows in excel

Hi,

To delete every other row in a worksheet. Right click the sheet tab, view
code and paste this in:-

Sub sonic()
Dim x As Long
Dim LastRow As Long
LastRow = Range("A65536").End(xlUp).Row
For x = LastRow To 1 Step -2
Rows(x & ":" & x).Delete
Next x
End Sub

Mike

"Martin R" wrote:

I have a table generated by a datalog program running for about 7 days.
Unfortunately the log interval was inadvertantly set to 5 instead of 30
seconds, & the data now extends over 2 text files, each of about 65000 lines,
close to the Excel 2003 limit. Can anyone advise a simple way to delete
alternate rows, either in the text file or in the excel file?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default is there a way to delete alternate rows in excel

Mike has a good solution but if VBA is not for you:
Insert a new A column
In A1 enter 0, in A2 enter 1
Copy A1:A2 down to end of worksheet, resulting in 0,1,0,1,0,1....
Sort all the data using A as the key
Now delete either the top or the top half
Then delete column A
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Martin R" <Martin wrote in message
...
I have a table generated by a datalog program running for about 7 days.
Unfortunately the log interval was inadvertantly set to 5 instead of 30
seconds, & the data now extends over 2 text files, each of about 65000
lines,
close to the Excel 2003 limit. Can anyone advise a simple way to delete
alternate rows, either in the text file or in the excel file?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default is there a way to delete alternate rows in excel

Set up a column =MOD(ROW(),2), filter by that, & delete the unwanted rows.
If you've got data at 5 seconds instead of 30, it sounds like you might want
=MOD(ROW(),6)
--
David Biddulph

"Martin R" <Martin wrote in message
...
I have a table generated by a datalog program running for about 7 days.
Unfortunately the log interval was inadvertantly set to 5 instead of 30
seconds, & the data now extends over 2 text files, each of about 65000
lines,
close to the Excel 2003 limit. Can anyone advise a simple way to delete
alternate rows, either in the text file or in the excel file?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 320
Default is there a way to delete alternate rows in excel

Hey, Bernard -- you should have a "MVP" logo after your name -- ask Mike F
about how this happens. And, in case I forgot, congrats! (Or am I mistaken??)

"Bernard Liengme" wrote:

Mike has a good solution but if VBA is not for you:
Insert a new A column
In A1 enter 0, in A2 enter 1
Copy A1:A2 down to end of worksheet, resulting in 0,1,0,1,0,1....
Sort all the data using A as the key
Now delete either the top or the top half
Then delete column A
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Martin R" <Martin wrote in message
...
I have a table generated by a datalog program running for about 7 days.
Unfortunately the log interval was inadvertantly set to 5 instead of 30
seconds, & the data now extends over 2 text files, each of about 65000
lines,
close to the Excel 2003 limit. Can anyone advise a simple way to delete
alternate rows, either in the text file or in the excel file?




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
Inserting alternate blank rows in Excel KopRed Excel Discussion (Misc queries) 4 April 14th 08 10:32 PM
How do I delete blank rows (rows alternate data, blank, data, etc ncochrax Excel Discussion (Misc queries) 2 June 27th 07 04:40 AM
Excel should let you fill alternate rows automatically McNaddy Excel Discussion (Misc queries) 0 October 9th 06 11:13 AM
Delete a group of alternate cells poleary53 New Users to Excel 1 March 7th 06 11:05 PM
How do I shade alternate rows in Excel 2002? drummergirl73 Excel Discussion (Misc queries) 2 November 29th 04 09:17 PM


All times are GMT +1. The time now is 09:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"