How to make a macro auto-filter that the user can choose date?

Hi, I need a macro to use auto-filter to do 2 things. The first is in column A select blank cells and then in column N select a date range.
The user needs to input TODAY's date and that's all.
Could the auto-filer select all dates after today's date?

Thanks,
Jimi
Jimi ShermanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

byundtMechanical EngineerCommented:
Here is a macro that lets the user choose a date. The inputbox defaults to the current date. The macro then filters column A for blanks and column N for values after the user-specified date.
Sub Postdated()
Dim rg As Range
Dim sDate As String
Dim dat As Date
sDate = InputBox("Only show column N dates after this date", Default:=Format(Date, "m/d/yyyy"))
If Not IsDate(sDate) Then Exit Sub

dat = CDate(sDate)
sDate = ">" & Format(dat, "m/d/yyyy")
Set rg = ActiveSheet.UsedRange
rg.AutoFilter
rg.AutoFilter Field:=1, Criteria1:="="
rg.AutoFilter Field:=14, Criteria1:=sDate, Operator:=xlAnd
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jimi ShermanAuthor Commented:
Perfect!!
Thank you so much Brad
Jimi
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.