ChiefLapuLapu
New Member
- Joined
- Apr 7, 2022
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hi All,
I am trying to figure out a way to make my autofilter criteria dynamic as it will change in the future. The criteria is a week ending date that will change in two week increments. So 3262022 will turn into 4092022 the next time I run the macro. Is there anyway to do this other than updating the code regularly?
Thanks in advance.
I am trying to figure out a way to make my autofilter criteria dynamic as it will change in the future. The criteria is a week ending date that will change in two week increments. So 3262022 will turn into 4092022 the next time I run the macro. Is there anyway to do this other than updating the code regularly?
Thanks in advance.
VBA Code:
ActiveSheet.Range("$A$1:$L$" & LR).AutoFilter Field:=8, Criteria1:= _
"3262022"