none
Advanced filter is not working with vba RRS feed

  • Question

  • Hi, I cant understand why I have no results when running the code, which I recorded.

    It worked fine with Excel 2010, but is useless in Excel 2016.

    Sub AdvFilt()
    
        Range("A1:E20").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
            "H1:L2"), CopyToRange:=Range("H4:L100"), Unique:=False
    End Sub
    This is the data:


    Thank you for your help!
    Jorge


    • Edited by Deus Irae Tuesday, November 5, 2019 3:50 PM
    Tuesday, November 5, 2019 3:48 PM

All replies

  • Solved!

    The problem was the date format in the criteria, although my system is configured with european date format, in the criteria I had to use american: <=11/30/19.

    Tuesday, November 5, 2019 5:57 PM