View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Earl Kiosterud Earl Kiosterud is offline
external usenet poster
 
Posts: 611
Default Deleting Rows of Data

Here's a manual way. Add a helper (temporary) column to your table, with a heading (if your
table doesn't have a heading row, this won't work unless you add one). Put the following
formula in the first row below the heading row:

=MOD(MINUTE(B2),5)<0

All the rows that aren't 5-minute multiples will say TRUE. Now apply an autofilter to your
table (Data - Filter - Autofilter). Filter the helper column for TRUE (Click the helper's
dropdown and select TRUE). This should result in all the rows you don't want. Now select
all the rows (click the row header of the first, then press Ctrl-Shift-DownArrow). Delete
the rows (Edit - Delete, or Ctrl-Minus). Now remove the autofilter (Data - Filter -
Autofilter). Delete the helper column. Done.

--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"SU" wrote in message
...
I have a spreadsheet with 38000 rows of data. The data comes in with date
(01/01/01) in column A and time (12:00:00) in Column B. The data is recorded
every 5 secs.

I would only want to keep data every 5 mins and delete the rest. I gather
this can be done in two ways:

1) by deleting 'x' number of rows below the first data and repeat the process.

2) by matching values **:00:00, **:05:00, **:10:00 and such in Column B and
deleting the rest of the columns.

Can anyone help me with a macro to do this?

Many thanks.