I'm new to VBA so appreciate all re-directions. I have the below (Excel generated) macro. And have two questions. Both are to how to remove hard coding and move to variables.
In the first command, how do I equivalent of Ctrl End to specify the full range? The number of rows will change daily and so need a method to encompass all rows daily.
In the second command, how do I use a Date function to specify (today-1) for Criteria1 and (today) for Criteria2.
I've tried using Date, Date(), "Date" and several other variations but to no avail.
The specific version of Excel is 2013. If there are better ways to do this, feel free to show me how. I suspect there are many more and better methods.
I am trying to automate a report that normally takes 30m manually every day. This is only a small subset of the code.
Cheers! --Paul
Sub Macro7Step2()
'
' Macro7Step2 Macro
'
'
ActiveSheet.Range("$A$1:$AT$9272").AutoFilter Field:=17, Criteria1:= _
">=8/23/2021", Operator:=xlAnd, Criteria2:="<=8/24/2021"
ActiveSheet.Range("$A$1:$AT$9272").AutoFilter Field:=3, Criteria1:= _
"In Production"
End Sub