+ Reply to Thread
Results 1 to 4 of 4

Deleting a row where a cell contains a date in a column

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2007
    Posts
    4

    Deleting a row where a cell contains a date in a column

    Hello,

    I am a novice when it comes to macros and I can't seem to solve my issue. I have a macro already set to modify columns, etc and at the end I need it to search for a certain date in a certain column and delete the entire row if the criteria is met. In my worksheet, I need it to search column N (for the entire worksheet) for a date that has a year of 1900. If 1900 is found in column N, regardless of month or day, it should delete the entire row. Currently an example of how the data looks in column N is 1900/01/01, but some formats include a time stamp. I believe my issue is with the way the date is formatted. I have tried the following but it is not deleting anything.


    Please Login or Register  to view this content.
    I have attached a sheet that has how the dates appear so you can see the formatting of the dates.date format.xlsx

    Any help is greatly appreciated. Thanks.
    Attached Files Attached Files
    Last edited by Cutter; 09-05-2012 at 07:49 PM. Reason: Added code tags

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Deleting a row where a cell contains a date in a column

    I haven't try it yet, but give it a try

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Deleting a row where a cell contains a date in a column

    @ macrohelp5

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  4. #4
    Registered User
    Join Date
    09-05-2012
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Deleting a row where a cell contains a date in a column

    JieJenn - that worked, thank you so much for your help!

+ 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