Quick way of deleting alternate rows
Quick way of deleting alternate rows
(OP)
A data logger was unfortunately set to a very high sample rate, thus creating a huge file of mainly replicate data, which is too large to put into a single simple graph.
Is there an easy way of thinning out this file in excel, i.e. deleting every other line, to half the file size?
I only know how to do it longhand and the macros I tried to write haven’t been too successful!
It's probably quite simple, but obviously beyond my capabilities! - Any help appreciated, thanks.
Is there an easy way of thinning out this file in excel, i.e. deleting every other line, to half the file size?
I only know how to do it longhand and the macros I tried to write haven’t been too successful!
It's probably quite simple, but obviously beyond my capabilities! - Any help appreciated, thanks.
RE: Quick way of deleting alternate rows
Try this code, it is a slight workaround but works.
Sub Macro1()
Range("a1").Select
Do Until ActiveCell = ""
Selection.Offset(1, 0).Select
Selection.EntireRow.Delete
Loop
End Sub
Hope this helps.
----------------------------------
maybe only a drafter
but the best user at this company!
RE: Quick way of deleting alternate rows
An alternative, should you have any blank cells
Sub Macro1()
Range("a1").Select
For Count = 1 To Range("a65536").End(xlUp).Row
Selection.Offset(1, 0).Select
Selection.EntireRow.Delete
Next Count
End Sub
Hope this helps.
----------------------------------
maybe only a drafter
but the best user at this company!
RE: Quick way of deleting alternate rows
RE: Quick way of deleting alternate rows
add a column
enter 1 2 1 2
do a sort, and delete the 2's
RE: Quick way of deleting alternate rows
RE: Quick way of deleting alternate rows
Cheers, Craig
RE: Quick way of deleting alternate rows
RE: Quick way of deleting alternate rows