If
dDate and the date you are filtering for (today?) is exactly the same, then it shouldn't be a problem. If the problems still persists, can you attach a sample file.
If
dDate and the date you are filtering for (today?) is exactly the same, then it shouldn't be a problem. If the problems still persists, can you attach a sample file.
A dream is not something you see when you are asleep, but something you strive for when you are awake.
It's usually a bad idea to say that something can't be done.
The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve
Join us at Facebook
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.
I tried attaching my file but the size (849 Kb) exceeds the formum limit for xls files.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
https://www.youtube.com/@alanelston2330/featured
Last edited by DocAElstein; 09-13-2023 at 11:23 AM.
Attached as ZipAttachment 406
Bookmarks