+ Reply to Thread
Results 1 to 3 of 3

Yesterday Date Filter

  1. #1
    Registered User
    Join Date
    06-17-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    37

    Yesterday Date Filter

    Hi, I am trying to create a macro that must update data daily. It must filter a list of data to show yesterday's date and count those orders only. Currently I have the yesterday filter applied and the code looks like this:

    ActiveSheet.Range("$A$4:$AR$607").AutoFilter Field:=2, Criteria1:= _
    xlFilterYesterday, Operator:=xlFilterDynamic

    My problem is I need to exclude weekends and show workdays only. On Monday, it will currently search for Sunday's date. I need it to search for last Friday's date. Is there a way I can add an IF clause or use some kind of advanced criteria? Thanks so much for the help!

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Yesterday Date Filter

    Hi Angelfish,

    try this..

    Please Login or Register  to view this content.
    or change datatype to CLNG if required..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Registered User
    Join Date
    06-17-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Yesterday Date Filter

    Wow that worked!!!! Thank you so much!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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