Macro to simplify amount of data

Lewisjsimpson

New Member
Joined
Aug 29, 2022
Messages
2
Platform
  1. Windows
Hello,

Was hoping someone might be able to assist. I've got a mass amount of data, over 220000 lines that I'd like to reduce. Data was taken off a flow meter I had installed that took readings every 5 seconds over the course of a month. I want to delete alot of the data so that there is only one reading every minute.

Is there a macro or code I can use that can delete rows from the spreadsheet while keeping one row for each minute? Otherwise I'm going to have to go through each line individually and delete them?

Thanks,
Lewis
 

Attachments

  • image001.png
    image001.png
    21.5 KB · Views: 6

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Select your table, including headers, then click Data > Remove Duplicates in the toolbar.
Make sure 'My data has headers' is checked
Un-check the box next to 'Flow Rate' (leave the Date/Time box checked)
Click OK

This will work as long as the date/time values are as shown. If they're actually 13:24:01, 13:24:06, 13:24:11, etc. then this won't work as they're not truly duplicates (they're just formatted to appear that way).

Also note, this will keep the first instance of each duplicate and discard the rest.
 
Upvote 0
Solution
Thank you Z51. The time at the moment has only been formated to remove the seconds but I should be able to remove them.
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,109
Members
448,548
Latest member
harryls

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