+ Reply to Thread
Results 1 to 3 of 3

Showing rows in listbox that are older than 2 months based and delete

  1. #1
    Registered User
    Join Date
    04-24-2020
    Location
    USA
    MS-Off Ver
    WA
    Posts
    64

    Showing rows in listbox that are older than 2 months based and delete

    Hi Excel Ninjas!

    I am having an issue where I can't seem to figure out how to fill a listbox with rows that only 2 months old based/compare the data value to a Now() function in row "R". I also would like to multiselect the values and click delete to remove them from the sheet ("Test").

    I have headers on A1 to M, data starts on row 2. Also my Listsource is a dynamic list name"ItemList". I am tinkering this code, but no success.

    Please Login or Register  to view this content.
    Results: nothing. Selected items are not deleting from sheet "Test".

    Thank you!
    Last edited by Pepe Le Mokko; 04-25-2020 at 04:55 AM. Reason: Code tags

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,271

    Re: Showing rows in listbox that are older than 2 months based and delete

    Welcome to the forum, sniper1.

    The yellow banner at the top of the page explains how to add an example file.

    Also could you please add Code Tags to your 1st post. Select your code, then press the # button.

    Edit Mod : Thank you, the tags were added by moderation
    Last edited by bakerman2; 04-25-2020 at 06:49 AM. Reason: Typo
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,603

    Re: Showing rows in listbox that are older than 2 months based and delete

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

+ 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. Counting entries and ignoring older than 6 months
    By Akradon in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2015, 12:32 PM
  2. Delete Rows if Date in Column A is Older Than 6 Years
    By BantamPCI in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-12-2014, 06:13 AM
  3. How do a delete rows with specific months
    By dalewms3 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-28-2014, 12:40 AM
  4. [SOLVED] Delete if older than 3 months and offsetting a cell input if match found
    By Templemind in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2014, 07:25 AM
  5. Excel Formula Showing Revenue Recognition Based on Days and Months
    By stratcat3345 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2014, 06:13 AM
  6. Delete Rows with dates older than previous Friday
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2013, 04:51 PM
  7. Macro to compare multiple columns then delete rows with older dates
    By azurememories in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-23-2011, 05:43 PM

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