+ Reply to Thread
Results 1 to 3 of 3

Macro to find Date Cells > Current Date and delete everything to left of that cell

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Macro to find Date Cells > Current Date and delete everything to left of that cell

    Hi everyone

    I am working on a macro to delete everything to the left of a cell which is greater than the current date, I am getting confused because is gives me 'Run-time error '13' Type mismatch' with the part of my code which is
    Please Login or Register  to view this content.
    . It's very frustrating, would anyone be able to show me how to fix this, this is the code:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to find Date Cells > Current Date and delete everything to left of that cell

    Please Login or Register  to view this content.
    I notice i should be Long, but what is the purpose of if anyway? What are you trying to accomplish? There is no reference to it within the Loop?

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to find Date Cells > Current Date and delete everything to left of that cell

    Does this do what you want?

    Please Login or Register  to view this content.

+ 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. [SOLVED] 2 Columns - Find Data to Last Item Entry & Date to Left of Cell
    By mycon73 in forum Excel General
    Replies: 7
    Last Post: 08-17-2014, 08:00 PM
  2. [SOLVED] Macro to find a cell within a row that contains the current date
    By swearley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2013, 07:44 AM
  3. [SOLVED] Delete Blanks and Shift Cells Left with Current Selection
    By Bunnyla in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-05-2012, 02:38 AM
  4. Conditional Formatting on another cells date value to the current cell date
    By jennys83 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2012, 12:55 PM
  5. create macro to delete row with a date previous to current date
    By laserk7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2008, 12:36 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