Automatic deleting of rows depending on time stamp

jan123

New Member
Joined
Nov 27, 2005
Messages
12
Hi can someone help with this please ….

I have a data logger that does not give a consistent row of data per time units… sometimes I get 3 rows per sec…sometimes I get 5 etc…. How can I “delete” rows automatically so I only end up with one row per sec.. The first column is the time stamp row. 00:00:00 …

Appreciate any help on this

Jan
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Jan,

Have you tried using Advanced Filter and selecting unique records only? As long as the multiple entries per second are all the same, this should work for you...

HTH
 
Upvote 0
Thanks for the reply. I probably did not explain myself very well.

Each row begins with a time stamp – When the data logger wrote the data to the file.

23:00:01
23:00:01
23:00:01
23:00:02
23:00:02
23:00:03
23:00:04
23:00:04

My problem is that I need to ensure I have the same number of rows for each time stamp. So in the above example. I need to filter out the relevant rows…and I end up with

23:00:01
23:00:02
23:00:03
23:00:04

If I had got 2 reading at time stamp 23:00:03 … I would only have had to remove one 23:00:01 …. I can easily scan down the rows and see that I have a minimum 2 or 3 readings per sec…Now I need a fast way to remove the extra rows…

Any thought ??
 
Upvote 0
Jan,

I still do not see why using advanced filter would not work for you. I tried it on the sample data that you provided and it worked fine.

Go to Data | Filter | Advanced Filter

Then make sure that you have correct range selected. Also remember to select "Unique Records Only". This is key. That should do it for you.

However, if you have other records after the time stamp, you should then select the entire data area that you want to sort as your "list range", and then select the time stamp column as your "criteria range". Then remember to select "Unique records only"

If this is not what you're looking for, you may need to post more information.

HTH
 
Upvote 0
Thanks Poorwallace !!

You are spot on. My fault for not looking closely enough the first time ! That did the trick. I now have one line (row) for every second and I can match the data with another list of data I have.

I know I am moving the goal post…but lets say I wanted 3 or 4 rows per second (assuming that my logger has covered a minimum of this number of rows…. It looks like the logger is doing a minimum of 4 readings every second. But in some occasions it can be as high as 6 or 7 …. The question would be…What is the highest number of reading done every second over the complete logging period, per second…and remove all other reading…Then I might end up with a complete list with 4 reading per second…….any bright ideas ???
 
Upvote 0
Jan,

***If anyone wants to contribute an easier way (and there most certainly is one, feel free ... :biggrin:

Given the progress that I am making on creating a macro to address your situation, I advise you to do the following. (These instructions should work for Excel 2003)

Go to Data | Pivot Table & PivotChart Wizard
Select Microsoft Office List or Database & Select Pivot Table (Next)
Select the Data which you want to filter (one column with heading should do fine)

Then you may want to put your table on a different sheet (so create new)
Ok, now that you've got your pivot table, drag the data into the row area and then drag the data again into the data area. Now select the box which should say something like Sum of "Time Stamp" and right click. Now select Field settings and select Count

Now that you have the counts there

Enter this formula into a cell... = MIN(A4:A8) <--- put your range here

put that number in this line in the macro given here

If Application.WorksheetFunction.CountIf(Rng.Columns(1), V) > 1 Then

http://www.mrexcel.com/board2/viewtopic.php?t=181756&highlight=step+1
 
Upvote 0

Forum statistics

Threads
1,213,560
Messages
6,114,306
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top