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




Reply With Quote

Bookmarks