A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Be more specific with your filter range, like this, if your header for column L is in L3 (and you have no merged cells in L3 or below, or , if you do, then they are merged with L as the left-most cell, and the merging is consistent):
Sub YTDFilter2()
With ActiveSheet
.Range(.Range("L3"), .Range("L3").End(xlDown)).AutoFilter Field:=1, Criteria1:= \_
xlFilterYearToDate, Operator:=xlFilterDynamic
End With
End Sub