Feebles
06-10-2016, 10:41 PM
I am trying to make data dynamic (as I add data daily) for autofilter
It works when i use the following code....but it is not dynamic
Private Sub CommandButton1_Click()
Crit = CLng(Range("G1").Value)
ActiveSheet.Range("$A$7:$N$112").AutoFilter Field:=1, Criteria1:=">=" & Crit, Operator:=xlAnd, Criteria2:="<=" & Crit
The data starts at A7 which is the header
I tried to change the ("$A$7:$N$112") to ("$A$7").currentregion.autofilter etc etc
any help here will be appreciated
Regards
Graham
It works when i use the following code....but it is not dynamic
Private Sub CommandButton1_Click()
Crit = CLng(Range("G1").Value)
ActiveSheet.Range("$A$7:$N$112").AutoFilter Field:=1, Criteria1:=">=" & Crit, Operator:=xlAnd, Criteria2:="<=" & Crit
The data starts at A7 which is the header
I tried to change the ("$A$7:$N$112") to ("$A$7").currentregion.autofilter etc etc
any help here will be appreciated
Regards
Graham