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
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

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.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,580
Messages
5,512,184
Members
408,884
Latest member
diggio

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top