L
Lvenom
I have a macros to filter data based on user input that works just fine.
My problem is when the user input is supposed to be the data excluded
from the filter my macro doesn't seem to filter out the undesired data.
(Data is date related with one filter asking to see data from a specific
date and the other fliter asking not to see data from a specific date.
My code is below...can anyone see my mistake? Thank you in advance for
your help
To include specific date:
'Get the filter's criteria from the user
FilterCriteria = InputBox("Enter Scheduled Downday.(MM/DD/YY)")
'Filter the data based on the user's input
Selection.AutoFilter Field:=12, Criteria1:=FilterCriteria
To exclude specific date
'Get the filter's criteria from the user
FilterCriteria = InputBox("Enter Scheduled Downday.(MM/DD/YY)")
'Filter the data based on the user's input
Selection.AutoFilter Field:=12, Criteria1:="<>FilterCriteria"
My problem is when the user input is supposed to be the data excluded
from the filter my macro doesn't seem to filter out the undesired data.
(Data is date related with one filter asking to see data from a specific
date and the other fliter asking not to see data from a specific date.
My code is below...can anyone see my mistake? Thank you in advance for
your help
To include specific date:
'Get the filter's criteria from the user
FilterCriteria = InputBox("Enter Scheduled Downday.(MM/DD/YY)")
'Filter the data based on the user's input
Selection.AutoFilter Field:=12, Criteria1:=FilterCriteria
To exclude specific date
'Get the filter's criteria from the user
FilterCriteria = InputBox("Enter Scheduled Downday.(MM/DD/YY)")
'Filter the data based on the user's input
Selection.AutoFilter Field:=12, Criteria1:="<>FilterCriteria"