+ Reply to Thread
Results 1 to 5 of 5

How To Code Dual Criteria For Filtering

  1. #1
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    How To Code Dual Criteria For Filtering

    Hi all,

    so far, I've been able to get the first criteria to work, finding all the "Pending" items in the range, but I'm obviously not getting the syntax right with regards to the second criteria that filters dates.
    Basically, I want the second criteria to filter so that it only shows dates between Today() and the 7 days previous.
    Would someone be able to point me in the right direction with that?
    Cheers,
    AJ
    Please Login or Register  to view this content.
    Last edited by ScotyB; 08-09-2016 at 07:20 PM. Reason: mark as solved
    Always grateful for the help here - thanks.

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: How To Code Dual Criteria For Filtering

    Try this syntax. Also note myDate doesn't equal today() but equals date (which will give you today's date in VBA

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

  3. #3
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,347

    Re: How To Code Dual Criteria For Filtering

    Try
    Please Login or Register  to view this content.
    For me this swaps dd and mm to us format but probably that's just my settings - otherwise easy enough to fix...

    Oh well looks like Crooza beat me

  4. #4
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Re: How To Code Dual Criteria For Filtering

    Thanks, Crooza and scottiex,

    tried those variations at work last night and all is good.

    Cheers,

    AJ

  5. #5
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: How To Code Dual Criteria For Filtering

    Great and thanks for the rep points
    Last edited by Crooza; 08-10-2016 at 12:27 AM. Reason: Auto spell demons

+ 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. If Statement checking Dual Criteria
    By jharvey87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-11-2016, 04:26 PM
  2. [SOLVED] Why is my code not filtering all of my criteria?
    By Sgligori in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-16-2016, 03:23 PM
  3. Dual code help. Unable to come up with a code to perform functions
    By justigger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2015, 06:06 AM
  4. Mode Array dual criteria date range
    By willis47 in forum Excel General
    Replies: 3
    Last Post: 12-22-2011, 02:01 PM
  5. Dual Lookup/Vlookup/Match criteria
    By jj72uk in forum Excel General
    Replies: 6
    Last Post: 10-16-2009, 04:03 PM
  6. SUMIF with dual criteria?
    By surfengine in forum Excel General
    Replies: 7
    Last Post: 11-10-2006, 07:29 PM
  7. Dual Criteria
    By sally100 in forum Excel General
    Replies: 4
    Last Post: 03-08-2005, 07:08 AM

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