+ Reply to Thread
Results 1 to 6 of 6

Remove Dates less than or equal to 30 days from Today’s Date

  1. #1
    Registered User
    Join Date
    05-02-2009
    Location
    New, New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Remove Dates less than or equal to 30 days from Today’s Date

    Please Login or Register  to view this content.
    Every time a date appears in Column B that is less than or equal to 30 days before today’s date I want to cut that entire row and paste it into a new row in Sheet2. If I was looking for a specific word or number I could easily use the code above but since today’s date is always changing, I am not sure how to write the search term so it works. Any direction I appreciate.
    Last edited by EJensen; 07-16-2009 at 05:51 PM. Reason: SOLVED

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove Dates less than or equal to 30 days from Today’s Date

    Hello EJensen,

    This macro copies the entire row of the cell in column "B" of "Sheet1" to column "A" of "Sheet2" if the date is no more than 30 days from today. The worksheet names and starting cells are marked in red. You can these to match what you are using.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    05-02-2009
    Location
    New, New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Remove Dates less than or equal to 30 days from Today’s Date

    Thank you for your assistance. Perhaps I made a mistake. I think I followed your instructions correctly, however I am getting an error message, when I run the code, on this line.

    Set RngEnd = DstRng.Cells(Rows.Count, DstRng.Column).End(xlUp)

    Any input is greatly appreciated.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove Dates less than or equal to 30 days from Today’s Date

    Hello EJensen,

    That was my fault. Here is the corrected code...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-02-2009
    Location
    New, New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Remove Dates less than or equal to 30 days from Today’s Date

    This is awesome. Thank you Leith Ross. Where do I find the scales to click on so I can rate the answer?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove Dates less than or equal to 30 days from Today’s Date

    Hello EJensen,

    Look on the right side of the title bar of your post. The icon is to the right of the post number.

+ 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