Hi All- I am new to this forum and need some help on a macro that i am trying to complete.

I am trying to filter a certain item from my macro, but the problem is that my data will sometimes have 100 rows or 500 rows. When i try to do the macro with other data, it will only grab up to row 301. I have been playing around with the VBA, but have had no luck. I basically want the filter to automatically grab all of Column M or up to row 1000- whichever is easier.

Here is the VBA:

Range("M1").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$M$301").AutoFilter Field:=13, Criteria1:= _
"FY13/14 PERIOD 1"

Thanks in advance.