+ Reply to Thread
Results 1 to 10 of 10

Macro to change text date into normal date

  1. #1
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Macro to change text date into normal date

    Hi All,

    I need some help on a macro. I have a file as attached and the problem is the dates in the below columns are all in text format and I need it to be in date format instead.
    I have a macro but whenever there is blank cells it stops the macro from running. Is there any better vba code I can use?

    The macro code which I am using is in Sheet2

    Columns that needs to be changed to Dates - Column F, I, S, T, AF, AK, AL, AO, AZ, BA
    (Also highlighted those columns in Yellow in Sheet 1)

    Kind Regards,
    MArk.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Macro to change text date into normal date

    Not coded but you can use text to columns on each to enter the cell values as you require.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Macro to change text date into normal date

    See if this is what you are after.
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro to change text date into normal date

    Try this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Macro to change text date into normal date

    or this:
    Please Login or Register  to view this content.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  6. #6
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to change text date into normal date

    Quote Originally Posted by PFDave View Post
    Not coded but you can use text to columns on each to enter the cell values as you require.
    Hi PFDave,

    Yes that works but Jindon provided a macro as well which wors. Thanks for your help sir. :-)

    Kind Regards,
    MArk.

  7. #7
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to change text date into normal date

    Quote Originally Posted by jindon View Post
    See if this is what you are after.
    Please Login or Register  to view this content.
    Hello Jindon,

    This works perfect. Many thanks Sir.

    Kind Regards,
    MArk.

  8. #8
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to change text date into normal date

    Quote Originally Posted by AlphaFrog View Post
    Try this...

    Please Login or Register  to view this content.
    Hi AlphaFrog,

    This works as well. Many thanks.

    Kind Regards,
    MArk.

  9. #9
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to change text date into normal date

    Quote Originally Posted by kev_ View Post
    or this:
    Please Login or Register  to view this content.
    Hi Kev_,

    This works for me as well.
    Thanks.

    Kind Regards,
    MArk.

  10. #10
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Macro to change text date into normal date

    @MArk You are welcome
    Spoilt for choice eh!!

+ 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: 2
    Last Post: 01-31-2017, 10:00 PM
  2. [SOLVED] How to change text date (eg. July) to actual date format?
    By kellyfirth in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-10-2015, 09:49 AM
  3. [SOLVED] Convert text to number and change date format in a macro.
    By Zimmerray1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-15-2014, 07:04 PM
  4. Macro to convert cells to text or value based on date change
    By simpson in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-17-2012, 09:47 PM
  5. [SOLVED] Macro to change the format of text to date
    By kishoremcp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2012, 09:57 AM
  6. Replies: 3
    Last Post: 07-11-2009, 12:39 AM
  7. Change text to date and check against date in cell
    By RW in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2006, 11:30 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