+ Reply to Thread
Results 1 to 3 of 3

Custom filtering dates in Excel 2007

  1. #1
    Forum Contributor
    Join Date
    09-06-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    225

    Post Custom filtering dates in Excel 2007

    When custom filtering dates in a column, is there a way to define the number of day prior to today?

    For example: I want it to filter for any dates that are 3 days before today or prior.
    -Today is 9/27, so it would show all dates 9/24, 9/23, 9/22, 9/21, etc...


    I have tried placing the formula "=today()-3" into the custom filter, but it did not work.


    I am trying to program this into a macro.



    Any help is much appreciated,

    Thank you.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Custom filtering dates in Excel 2007

    hi Gard5096, VBA is not my area of expertise so i'm going to offer something more manual. put a formula somewhere in say cell D1:
    =TODAY()-3

    then your VBA would look like:
    Please Login or Register  to view this content.
    i tried to play with the DATE in VBA, but DATE - 3 gives me 3 months before the date. again, not an expert here. but i'm sure there's a way

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor
    Join Date
    09-06-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    225

    Re: Custom filtering dates in Excel 2007

    You are awesomeeeee! I just added the column addition to the macro, and it worked greeeeat. Thank you

+ 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