How do I eliminate every fourth row of data in a large file?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am importing a very large data base that varies monotonically. To reduce
the size of the file, I would like to eliminate every fourth row of data.
How do I do that?Thanks, Marty
 
I would use a helper column.

Put 1 in the first cell, 2 in the cell below, then 3, then 4.

Select those four cells and right click and drag it down the column
Let go of the mouse and select "Copy Cells"

Then apply Data|Filter|autofilter to that column.

Filter that column to show the rows you want to delete
delete the visible rows
Delete that helper column.
 
I would add two helper columns. In one I would number the records ( 1
through however many you have - lets say this numbering begins in cell B2).
In the second, I would enter a formula

=MOD(B2, 4) and copy down the list.

Then use Autofilter to filter out the 0's on the column containing the MOD
formula and Edit/Delete/Entire Row. Turn off Autofilter and delete helper
columns.

Be sure to back up your data.
 
Or even a single column with a formula like:

=mod(row(),4)

And delete the rows from there. It may not be the cells that evaluate to
0--that would depend on what row you started.
 
Back
Top