Advanced Filter method

  • Hello everyone, I am a newbie in this forum. Hoping to get help from all the experienced users here :).

    I am facing a problem with AdvancedFilter method in my code. There's no error, just not working the way I expected. My data has a column 'Direction' which stores East, West, North,.... When I give the criteria as Direction - "North", it returns all rows with direction, "North East" and "North West" in addition to "North". Same happens with South. How can I get just the rows with North? Thanks.

  • Either format the criteria cell as text and enter:

    =North

    in it, or use this formula:

    ="=North"


    By default an advanced filter treats a text criterion as 'begins with'.

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why