+ Reply to Thread
Results 1 to 6 of 6

Date format changes after macro run

  1. #1
    Registered User
    Join Date
    05-16-2011
    Location
    Milton Keynes
    MS-Off Ver
    Excel 2007
    Posts
    29

    Date format changes after macro run

    Hi All

    I have a workbook where I import over a thousand rows of data into that I need to filter through. The data I import has the correct date format that I need ( dd/mm/yyyy ). 2 of the columns are purely dates in the worksheet but when I run my macro which hides columns and adds cond format etc to save time it throws the date into mm/dd/yyyy


    Is there any way I can change this. Look forward to a top draw response as always from this forum


    Miff3436

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Date format changes after macro run

    Hi,

    Format the columns before inserting data.

    Please Login or Register  to view this content.
    Please take time to read the forum rules

  3. #3
    Registered User
    Join Date
    05-16-2011
    Location
    Milton Keynes
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Date format changes after macro run

    Hi

    Thanks to the speedy respone. This probably sounds daft but where do i actually put this code ?

    i have adapted it to the columns i need and tried putting it in every event that would start before my macro runs...

    Thanks Miff3436

  4. #4
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Date format changes after macro run

    Just place it at the beginning of your code.

  5. #5
    Registered User
    Join Date
    05-16-2011
    Location
    Milton Keynes
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Date format changes after macro run

    Sorry it was just me been a bit slow ! Yes that does work I forgot to change the column letter



    Thanks again
    Miff3436

  6. #6
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Date format changes after macro run

    Your welcome, remember to mark the thread as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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