+ Reply to Thread
Results 1 to 5 of 5

Macro to delete date in cell

  1. #1
    Registered User
    Join Date
    11-03-2011
    Location
    Overland Park, KS
    MS-Off Ver
    Excel 2007
    Posts
    16

    Macro to delete date in cell

    Is there a way to write a macro that will delete data in a cell (A1) if cell B1 has data?

    I have a spreadsheet that list forecast dates and completion dates. I do not want to count the forecast date if they have a completion date. Currently I am filtering and manually deleting the forecast dates if they have a completion date. Very time consuming! Can someone please assist in a macro that would do this for me? Attached is a sample spreadsheet.

    Thanks in advance! And Happy Friday!
    Attached Files Attached Files
    Last edited by tracykay1; 11-09-2011 at 03:53 PM.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro to delete date in cell

    This macro will do what you want to do.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-03-2011
    Location
    Overland Park, KS
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Macro to delete date in cell

    That worked great!! You are amazing! One more favor, how do I get it to do that for every other column? Just like the data in Column B was deleted if Column C had a date, how do I get that to work for Column D and E, Column F and G, and so on?

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro to delete date in cell

    This should work. I added the condition that the macro will stop when the first cell in row 2 and column B,D,F,etc is empty.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-03-2011
    Location
    Overland Park, KS
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Macro to delete date in cell

    AMAZING!! That worked like a charm. You have just made my day as I have been working on this for several weeks. Cut my worktime in half. Thank you so much!

+ 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