+ Reply to Thread
Results 1 to 8 of 8

MACRO for finding dates which are less than or equal to current date,

  1. #1
    Registered User
    Join Date
    10-08-2011
    Location
    Mumbai
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Post MACRO for finding dates which are less than or equal to current date,

    Hello Everyone,

    I am new here, as well am new to VBA...

    I wana create macro which help to find dates which are less than or equal to current date.

    Can anyone help me for this?

    Also please suggest simple book for MACRO in excel

    Regards,

    Santosh

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: MACRO for finding dates which are less than or equal to current date,

    Hi,

    Do you really need a macro? Standard Data Filter will allow you to select the date column and filter dates that are equal to the current date - as well as many other criteria as well.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-08-2011
    Location
    Mumbai
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Re: MACRO for finding dates which are less than or equal to current date,

    @Richard,

    Thank you very much for your information. But can I use it in excel 2003 ?

    Regards,

    Santosh

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: MACRO for finding dates which are less than or equal to current date,

    Not without modifying the formula in A3. The filter options in 2007 were much improved over 2003. Your header indicates you have 2007 which is why I used it.

    In 2003 use in A3 and copied down

    Please Login or Register  to view this content.
    Then filter column A for either "M" for month or "Q" for quarter.

  5. #5
    Registered User
    Join Date
    10-08-2011
    Location
    Mumbai
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Re: MACRO for finding dates which are less than or equal to current date,

    @Richard,

    Thank you very much.

    but I am looking for dates on per day basis, not by month or quarter.

    Also wana use this for entire excel sheet

    so i guess macro will be helpful

    Regards,

    Santosh

  6. #6
    Registered User
    Join Date
    10-08-2011
    Location
    Mumbai
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Re: MACRO for finding dates which are less than or equal to current date,

    can any1 help me out

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: MACRO for finding dates which are less than or equal to current date,

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: MACRO for finding dates which are less than or equal to current date,

    Sorry, I inadvertently gave you an answer to another thread.

    In 2003 you can use Data Autofilter Custom. Select your date column, then select the "Is less than or equal to" option and enter the current date then OK.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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