Hello!
I'm new to this forum & not so great at coding Excel Macros!
I'm trying to creat a macro that performs the function Filter by selected Cells Value.
I use the record macro function & ive tried doing this by changing relative references, but i get the same result.
This is my code:
ActiveCell.Offset(3, 0).Range("A1").Select
ActiveSheet.Range("$G$4:$G$12").AutoFilter Field:=1, Criteria1:="4"
I want it so that the filtering criteria depends on which Box I am highlighting at the time. The code writes this as the example that i used when recording it. ( 4 )
Any ideas how to solve this?
Thanks in advance
I'm new to this forum & not so great at coding Excel Macros!
I'm trying to creat a macro that performs the function Filter by selected Cells Value.
I use the record macro function & ive tried doing this by changing relative references, but i get the same result.
This is my code:
ActiveCell.Offset(3, 0).Range("A1").Select
ActiveSheet.Range("$G$4:$G$12").AutoFilter Field:=1, Criteria1:="4"
I want it so that the filtering criteria depends on which Box I am highlighting at the time. The code writes this as the example that i used when recording it. ( 4 )
Any ideas how to solve this?
Thanks in advance