+ Reply to Thread
Results 1 to 5 of 5

Date format not changing

  1. #1
    Registered User
    Join Date
    10-21-2014
    Location
    Canada
    MS-Off Ver
    MS Office 2010
    Posts
    28

    Date format not changing

    Hello!

    I have several columns with the dates in them. I'm looking to create a VB code that searches certain ranges where the dates are located (example, Range("A1:A50") and convert them properly to the following NumberFormat("yyyy,mm,dd"). The problem is that my "Date" cells look like this "24.04.2006". Those periods seem to make the cell unable to convert properly to a "Date" format. Does anyone know how I can achieve this, given that ALL my date cells have decimal places?

    Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,528

    Re: Date format not changing

    Select the range of dates. Choose Text to Columns from the Data Ribbon. Delimited | delimiters not important | Column data format: Date: DMY | Press Finish

    Done


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Date format not changing

    A period(Dot) 24.04.2006 is a text in excel. you need to replace them with either / or - in the hope excel will read them as dates.

  4. #4
    Registered User
    Join Date
    10-21-2014
    Location
    Canada
    MS-Off Ver
    MS Office 2010
    Posts
    28

    Re: Date format not changing

    PERFECT! Thanks TMS, worked!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,528

    Re: Date format not changing

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Formula for Changing date format 3-12-13 to format d-mm-yy.
    By UNAB in forum Excel General
    Replies: 2
    Last Post: 04-08-2013, 03:52 PM
  2. [SOLVED] Changing Multiple sheet names by wk ending date for yr but need specific name/date format
    By kedeling in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2013, 02:40 PM
  3. Need help changing date to a sortable date format
    By slicksilver79 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 12-15-2011, 10:44 AM
  4. Formula required for date without changing the date format
    By suryaprasad in forum Excel General
    Replies: 1
    Last Post: 01-28-2009, 08:04 AM
  5. [SOLVED] Changing date serial numbers to date format
    By rdunne in forum Excel General
    Replies: 1
    Last Post: 04-14-2005, 08:06 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