+ Reply to Thread
Results 1 to 8 of 8

macro to conver text to date

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    macro to conver text to date

    assume the date is 12/10/2014, if i type 12 (frist two digit date), macro to change the format like 12/10/2014

  2. #2
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: macro to conver text to date

    Hi,

    Why don't you format the cell / column to custom date format which suits your requirement. Why do you need macro?


    Regards,
    Paresh J
    Click on "* Add Reputation" as a way to say thanks

  3. #3
    Forum Contributor
    Join Date
    10-19-2012
    Location
    chennai
    MS-Off Ver
    Excel 2013
    Posts
    134

    Re: macro to conver text to date

    Try the below one

    Please Login or Register  to view this content.
    RoyalRajan

  4. #4
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: macro to conver text to date

    if i type 2, i need to get it like this 02/10/2014

  5. #5
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: macro to conver text to date

    if you type 2/10 will get 02/10/2014. my question is if i type 2, will get 02/10/2014 (current month and year has to be updated)

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: macro to conver text to date

    Assuming that you want to convert dates in col. A, then place the below code for worksheet change event in Sheet Module.

    Please Login or Register  to view this content.
    Is this what you are trying to achieve?
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  7. #7
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: macro to conver text to date

    sktneer

    this is the one i asked for, it is working good
    thank you

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: macro to conver text to date

    You're welcome.
    If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.
    Moreover you may also click on * (star) to Add Reputation if the solution provided helped you. This is another way to say thanks.

+ 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. want to conver 1.45 in to mintues
    By anjana arora in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-12-2014, 03:55 PM
  2. Need to conver day/time format to seconds
    By EVak in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-26-2012, 11:31 PM
  3. how to conver #n/a's to 0
    By ray500 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2006, 03:39 PM
  4. [SOLVED] How Can I conver date i.e 18/11/2005 to 18112005.?
    By Manish Patel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2005, 12:35 PM
  5. [SOLVED] [SOLVED] Conver Numbers to Log 10
    By Fishfan in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-10-2005, 12:06 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