+ Reply to Thread
Results 1 to 2 of 2

need macro to filter only the date which has the format "mm/dd/yyyy" and not text date

  1. #1
    Registered User
    Join Date
    03-19-2012
    Location
    Hyderabd
    MS-Off Ver
    2007
    Posts
    1

    need macro to filter only the date which has the format "mm/dd/yyyy" and not text date

    Hi All,

    I am working on a Excel sheet which has a column with dates ( not only dates but also other text also like akldfjls, asdlf@dfa, aldfj123) and even i have a text in date like 40013, so i need a macro which will filter only the dates which has a format "mm/dd/yyyy".

    Any help would be high appreciated.

    Thanks to all the Genius who are help the beginners.

    Thank you so much in advance even for the people who tried it.

    Anil Kumar

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: need macro to filter only the date which has the format "mm/dd/yyyy" and not text date

    loop the data, check that the value contains 2 "/"'s and trap the error produced by CDATE(value) if it errors (not a date) hide the row.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM 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. Replies: 3
    Last Post: 08-13-2013, 06:25 AM
  2. [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
  3. Replies: 1
    Last Post: 11-01-2012, 10:37 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