Results 1 to 10 of 15

Thread: Do Not AutoFilter If Data Does Not Exist

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    still not working :(

    Thanks Excel Fox, yes I see your point. dDate (today's date) and the column I am filtering are the same so I don't know what i'm doing wrong. I think I have missed something silly.

    Code:
    Sub todaysdels()
    
        dDate = Date
        
        If Application.WorksheetFunction.CountIf(Range("U3:U500"), dDate) Then
         Range("A2").AutoFilter field:=20, Criteria1:=dDate
    Else
        MsgBox "No delivery for today!", vbOKOnly
     End If
        
    End Sub
    I tried attaching my file but the size (849 Kb) exceeds the formum limit for xls files.


    https://www.youtube.com/@alanelston2330/featured
    Last edited by DocAElstein; 09-13-2023 at 11:23 AM.

  2. #2

    file attached

    Attached as ZipAttachment 406

Similar Threads

  1. Replies: 2
    Last Post: 09-24-2012, 11:19 PM
  2. Checking Table Exist in Access Database or Not
    By littleiitin in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 11-16-2011, 04:32 PM
  3. AutoFilter by Multi Color
    By Admin in forum Download Center
    Replies: 0
    Last Post: 09-08-2011, 07:17 AM

Tags for this Thread

Posting Permissions

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