Results 1 to 4 of 4

Deleting rows from a list that contain a time later than a certain point

Threaded View

T12ISC Deleting rows from a list... 08-23-2014, 09:32 PM
alansidman Re: Deleting rows from a list... 08-24-2014, 11:43 AM
LJMetzger Re: Deleting rows from a list... 08-29-2014, 04:14 PM
T12ISC Re: Deleting rows from a list... 09-10-2014, 09:48 AM
  1. #1
    Registered User
    Join Date
    08-23-2014
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    5

    Deleting rows from a list that contain a time later than a certain point

    Hey guys,

    There must be a way to do this. I have a table and each row has a time column in the format of HH:MM:SS AM/PM. I want to be able to remove (delete) lines that contain a time that's later (and if possible, earlier) than a selected time/timeframe. Here's what I've tried:


    Sheets("MC Log Parser").Select
      With ActiveSheet.UsedRange
        .AutoFilter Field:=3, Criteria1:="*07:##:## PM*"
        .Offset(1).SpecialCells(xlVisible).EntireRow.Delete
        .AutoFilter
      End With
    My aim is to filter all but cells that contain anything within 7PM and then delete those visible cells. I think my issue is with the syntax of specifying a range of time. Can anybody help out?

    Thanks

    MT
    Last edited by alansidman; 08-24-2014 at 11:43 AM. Reason: code tags added

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Deleting a number of separate rows at the same time
    By nemmi69 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-21-2013, 10:42 AM
  2. Help with deleting rows according to time value
    By vpnvipin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2012, 06:10 AM
  3. Run-time error 13 - Problem deleting rows
    By Macster in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-05-2009, 03:51 AM
  4. Deleting rows to a defined point
    By Tim Green in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2006, 12:00 PM
  5. deleting mutliple rows in different ranges at same time
    By HeatherO in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-14-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1