+ Reply to Thread
Results 1 to 6 of 6

Three Criterias for filtering in excel?

  1. #1
    Registered User
    Join Date
    05-11-2015
    Location
    Brno, Czech Republic
    MS-Off Ver
    Word 2013
    Posts
    20

    Three Criterias for filtering in excel?

    Hi I have this macro for updating filtering when changes occur in different sheet. It works great, but I need one more Criteria to be in this macro...Is there a way to add Criteria3? It would be Criteria3:="<>0"



    Sub aktualizace_Filtru_xx_o()
    Dim x As Variant
    Set x = Sheets("skutečný SeznamPřílohDoprava")
    x.Range("$A$1:$B$51").AutoFilter Field:=2, Criteria1:="<>*xx*", _
    Operator:=xlAnd, Criteria2:="<>o*"

    End Sub


    Thanks for any advice!

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Three Criterias for filtering in excel?

    Hi CubaJz- I have not tested it, but try this:
    Please Login or Register  to view this content.
    Please click the Add Reputation star below any helpful posts, and use Thread Tools (up top) to mark your thread as SOLVED once you have your answer. Thanks!-Lee

  3. #3
    Registered User
    Join Date
    05-11-2015
    Location
    Brno, Czech Republic
    MS-Off Ver
    Word 2013
    Posts
    20

    Re: Three Criterias for filtering in excel?

    Unfortunately this doesn´t work, writes Method AutoFilter failed.

  4. #4
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Three Criterias for filtering in excel?

    Then you'll need to go with AdvancedFilter, which means defining a criteria range on a worksheet. Back in a few...

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Three Criterias for filtering in excel?

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  6. #6
    Registered User
    Join Date
    05-11-2015
    Location
    Brno, Czech Republic
    MS-Off Ver
    Word 2013
    Posts
    20

    Re: Three Criterias for filtering in excel?

    Hi thanks for your effort I really appreciate it, unfortunatelly for some reason it only applyed one filter - always the last on in Array (from your code above it applyed does not equal "0"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro Find set criterias to a colomn of number, delete the rows that don't meet criterias
    By TAMMY32 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-03-2017, 04:09 PM
  2. dynamic filtering of data with multiple criterias
    By Agreth in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-19-2017, 04:31 PM
  3. [SOLVED] Excel 2013 Advanced Filtering using Multiple Criterias
    By TallTex in forum Excel General
    Replies: 4
    Last Post: 03-03-2017, 05:28 PM
  4. Filtering data based on couple criterias
    By Vinkel in forum Excel General
    Replies: 2
    Last Post: 02-17-2016, 05:31 AM
  5. 2 criterias filtering
    By puiuluipui in forum Excel General
    Replies: 0
    Last Post: 09-27-2005, 04:40 PM
  6. excel, how do I get sumif with two criterias?
    By Mosqui in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  7. [SOLVED] excel, how do I get sumif with two criterias?
    By Mosqui in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1