So, I'm trying to use a filter to get a certain type of data for an entire column. I want the macro to operate so that it works for as long as the column goes, because number of data points would change often for my uses. When I tried to run the macro I got an error:

"Run time error '1004':
Auto Filter method of Range class failed"

My code is:
Selection.AutoFilter
    ActiveSheet.Range("$A$1:$E$13513").AutoFilter Field:=1, Criteria1:="mol/l"
    Columns("B:B").Select
    Selection.Copy
    Range("P1").Select
    ActiveSheet.Paste
    ActiveWindow.SmallScroll Down:=-81
    Application.CutCopyMode = False
    Selection.AutoFilter
    Range("O2").Select
and it is the first line "Selection.AutoFilter" which gives the error