I would like to create a macro where I can use mouse to select a name in tab "Capacity", and by pressing hot key Ctrl+Shift+Z, macro will activate and search this name in tab "Allocation" in a name filter
I am stucked with how to use macro to copy what I selected and paste this to the filter criteria
I have tried with this
   Sub Macro1()
    '
    ' Macro1 Macro
    ' Resource allocaiton breakdown
    '
    ' Keyboard Shortcut: Ctrl+Shift+Z
    '
            Selection.Copy
            Sheets("Allocation").Select
            ActiveSheet.Range("$A$9:$FL$529").AutoFilter Field:=6
            ActiveSheet.Range("$A$9:$FL$529").AutoFilter Field:=1
            ActiveSheet.Range("$A$9:$FL$529").AutoFilter Field:=6, Criteria1:="Target.Value"
End Sub
but it's not working,
I am fairly new to VBA
please advise
 
    