Results 1 to 3 of 3

Auto Filter By Times

Threaded View

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Auto Filter By Times

    Hi, I have a workbook I am trying to autofilter(Col I) by time greater than 4:00:00 am but less than 11:59:59pm but I'm not getting any results returned? I included a test book to help.

    Thank You, Mike

     Sub TEST()
      
    dTime = TimeSerial(4, 0, 0)
    eTime = TimeSerial(23, 59, 59)
    
    With Sheets(1)
        .Range("A1").AutoFilter Field:=9, Criteria1:=">" & dTime, Operator:=xlAnd, Criteria2:="<" & eTime
    End With
    End Sub
    Attached Files Attached Files
    Last edited by realniceguy5000; 03-14-2012 at 01:41 PM.

Thread Information

Users Browsing this Thread

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

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