+ Reply to Thread
Results 1 to 8 of 8

VBA code to select today() onwards from filter

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    VBA code to select today() onwards from filter

    Hi All, please can someone advise what code can be used to display date range today() onwards in Excel?

    As the date is always changing I can't use a fixed date, but the filter needs to show results based on current date onwards.

    Any help much appareciated

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA code to select today() onwards from filter

    In autofilter criteria you may use:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Re: VBA code to select today() onwards from filter

    Hi there, please can you clarify as that selected all dates I had - not just today onwards

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA code to select today() onwards from filter

    Can you attach a file? Izandol's suggestion should work.

  5. #5
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Re: VBA code to select today() onwards from filter

    Apologies, I was still including
    Please Login or Register  to view this content.
    at the end of the filter.

    That now works great, many thanks. Can i just ask, if I wanted to do this for date yesterday onwards is that also possible??

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA code to select today() onwards from filter

    Yes - is simply:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Re: VBA code to select today() onwards from filter

    Thanks for your help

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA code to select today() onwards from filter

    You are welcome.

+ 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. Help adding VBA code to existing macro to select "today's" date
    By kennected in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2012, 09:21 PM
  2. [SOLVED] Code to auto filter three month segments of data from today's date
    By gryffin13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2012, 04:51 PM
  3. VBA Code to select the values from a filter
    By vikas.bhandari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2007, 03:49 PM
  4. Select cell = today()
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2006, 09:30 PM
  5. [SOLVED] Way to have VB code to filter on entries that have cell with today's date?
    By StargateFan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-17-2005, 09:06 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