Assuming your Table is named "Table1"
And you want to filter field 5 which should be column "E"
And you want to filter the Table by the value in Range ("P1")
And your Table Range is ("A:P"
Try this script:
Dim Lastrow As Long
Dim ans As String
ans = Range("P1").Value
.AutoFilter Field:=5, Criteria1:=ans, Operator:=xlFilterValues