Greetings,
I can't figure out how to properly use my stored variable to filter a table. Here is what I have so far:
I can't figure out how to properly use my stored variable to filter a table. Here is what I have so far:
Code:
Sub Macro1 ()
' Macro1 Macro
' Declare Variables to be used
Dim ActSheet As Worksheet
Dim SelRange As Range
Dim FTE As String
' Set the Variables
Set ActSheet = ActiveSheet
Set SelRange = Selection
FTE = ActiveCell.Value
'
ActiveSheet.ListObjects("Table2").Range.AutoFilter Field:=1, Criteria1:= _
='FTE', Operator:=xlAnd
ActiveCell.Offset(-8, -3).Range("Table2[[#Headers],[Office ]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.ListObjects("Table2").Range.AutoFilter Field:=1
ActiveCell.Offset(0, 5).Range("A1").Select
ActiveSheet.Paste
End sub