Help with a macro

brianfitz

New Member
Joined
Aug 6, 2010
Messages
18
Hi guys, really hope someone can help.

I have a sheet of data, 2000+ rows and need to manipulate it in a variety of ways.

Basically I have a list of phone line information, broken down into half hourly increments over the course of a month and lists the relevant information across the rest of the colums.

What I need to do is delete every line where the time stamp is before 10am and after the last entry for 10.30am and do the same for 2 to 2.30 pm.

I've been doing this manually due to my lack of macro knowledge and I think I might be getting motion sickness so if anyone could lend a hand I'd be eternally grateful.

I realise my description may be a little vague so I have screenshots I could perhaps email people as my work firewall will not allow me to host the images anywhere.

Many thanks for any help,

Brian
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Weaver

Well-known Member
Joined
Sep 10, 2008
Messages
5,196
You could do this by first applying a filter to expose all entries where the data in question is between 10 and 10.30 am and delete the rows of data left visible, then do the same for you 2 - 2.30pm range.

If you're not familiar with filters there's plenty of help out there, including that built into Excel.

If you need to repeat the process often, then switch on 'record macro' which will record the steps in code required to achieve your task.

HTH
 

brianfitz

New Member
Joined
Aug 6, 2010
Messages
18
You could do this by first applying a filter to expose all entries where the data in question is between 10 and 10.30 am and delete the rows of data left visible, then do the same for you 2 - 2.30pm range.

If you're not familiar with filters there's plenty of help out there, including that built into Excel.

If you need to repeat the process often, then switch on 'record macro' which will record the steps in code required to achieve your task.

HTH

Thanks for your reply

Filters! Can't believe I didn't think of them. Looking at it though I've created an Autofilter over the data but when I go to select the filter for the "datetime" colum there are thousands of entries when I try to customise it as every single has a data identifier.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,583
Messages
5,832,594
Members
430,144
Latest member
bruno92

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
Top