+ Reply to Thread
Results 1 to 10 of 10

change date format by vba code

  1. #1
    Registered User
    Join Date
    02-23-2015
    Location
    hk
    MS-Off Ver
    window7
    Posts
    240

    change date format by vba code

    Hi All,

    pls help
    how to change the date format for column b to column c . we have
    thousands data in column b so we need vba code to do this job

    pls find attached file

    thanks all
    best regards
    tom
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-28-2014
    Location
    harbin,china
    MS-Off Ver
    2007
    Posts
    162

    Re: change date format by vba code

    It needn't vba code if you just want change date format no matter how many cells you have. Right click column's head, then setting cells' format.

  3. #3
    Registered User
    Join Date
    02-23-2015
    Location
    hk
    MS-Off Ver
    window7
    Posts
    240

    Re: change date format by vba code

    dear sir,

    if we have many sheet , and we need to do this again and again. hope we have vba code to minimize the work
    and we just right click columns head, then setting cells format, it don't work

    hope we have vba code to do this job. it is only one sheet for ask help. actually we have many sheet like this
    thanks for your great idea and help. many thanks

    Thanks
    Tom

  4. #4
    Forum Contributor
    Join Date
    09-28-2014
    Location
    harbin,china
    MS-Off Ver
    2007
    Posts
    162

    Re: change date format by vba code

    As your wish.
    Try
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-23-2015
    Location
    hk
    MS-Off Ver
    window7
    Posts
    240

    Re: change date format by vba code

    Dear sir

    thanks for your great help. i am very fresh for vba code. we try but dont work
    that is file name"change date format questions" after vba code the file will become"change date solutions"

    thanks for your help
    tom
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: change date format by vba code

    If dates have always 10 characters this wil do



    Kind regards
    Leo
    Attached Files Attached Files

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: change date format by vba code

    Another option that will work with 2015 or 15 as the year... does assume that the order is year-month-day and separated by a dash (-):

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  8. #8
    Registered User
    Join Date
    02-23-2015
    Location
    hk
    MS-Off Ver
    window7
    Posts
    240

    Re: change date format by vba code

    dear all,

    both solution is work. it is great . many thanks. but the final solution is to change the date to number format as file attached. after vba code, we cannot change to number format. pls help

    many many thanks
    tom
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: change date format by vba code

    Did you test the file @ post #6


    Kind regards
    Leo

  10. #10
    Registered User
    Join Date
    02-23-2015
    Location
    hk
    MS-Off Ver
    window7
    Posts
    240

    Re: change date format by vba code

    yes , the problems solved

+ 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. Need vba code to change date&time stamp as date format dd-mmm-yy in A:A rng
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2014, 06:08 AM
  2. [SOLVED] help on vba code to make list continue column and change date format
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2013, 12:06 PM
  3. [SOLVED] help on vba code to change the error date format as standard format mm/dd/yyyy
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2013, 01:10 AM
  4. Need Formula/VBA Code to convert date in String Format to Normal Date format
    By Karthik Sen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2012, 04:54 AM
  5. Change date format into text through vb code.
    By ebin charles in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2011, 02:04 PM
  6. Not able to change date format into proper excel date format
    By excel5111987 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2011, 08:19 AM
  7. Userform date format reverting back to us format on change event
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2009, 12:34 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