+ Reply to Thread
Results 1 to 4 of 4

Macro-Highlight cells in column D if the date format is other than "mmm-dd-yyyy hh:mm:ss"

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    10

    Macro-Highlight cells in column D if the date format is other than "mmm-dd-yyyy hh:mm:ss"

    I have a excel in which the user enters date in column D. I need to highlight the cells in column D if the user does not enter the date in the format "mmm-dd-yyyy hh:mm:ss" . I tried conditional formatting but the problem is the users might copy and paste bulk dates in Column D. So I need a macro that validates and highlights the date after the user has entered the date. The macro should highlight the dates that are in other format than ""mmm-dd-yyyy hh:mm:ss".

  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-Highlight cells in column D if the date format is other than "mmm-dd-yyyy hh:mm:

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro-Highlight cells in column D if the date format is other than "mmm-dd-yyyy hh:mm:

    Hi Buddy,

    The above code does not work
    The format "mmm-dd-yyyy hh:mm:ss" is a custom format Kindly help ..

    I ll provide you with a sample data.


    Jan-01-2013 00:00:00- Correct format
    Should highlight the wrong formats below
    01-01-2013
    01/01/2013 00:00:00
    01/01/2013 0:00

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

    Re: Macro-Highlight cells in column D if the date format is other than "mmm-dd-yyyy hh:mm:

    Sorry it doesn't work for you. But I tested it again on your sample data and it works for me?

+ 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] Format a column as date format "yyyy-mm-dd"
    By Seraph122 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-11-2013, 01:30 AM
  2. Replies: 1
    Last Post: 11-01-2012, 10:37 AM
  3. Replies: 2
    Last Post: 08-17-2012, 05:10 AM
  4. Replies: 0
    Last Post: 08-09-2012, 04:31 PM
  5. convert string to date format of "d-mmm-yyyy"
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-12-2011, 09:48 AM

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