+ Reply to Thread
Results 1 to 4 of 4

date format 2000 vs 2003

Hybrid View

  1. #1
    Registered User
    Join Date
    07-28-2009
    Location
    Newcastle
    MS-Off Ver
    Excel 2003
    Posts
    38

    date format 2000 vs 2003

    I've got an issue with date formatting in excel 2000.
    I have a spreadsheet that was written in excel 2003 and in a certain cell the date appears as dd mmm yyyy. When the spreadsheet is opened in 2000 it changes to day, dd mmmm yyyy (e.g. Friday, 23 September 2009) and this no longer fits and displays as ######.
    I've tried putting some formatting code in VBA and =today() in the cell, but the formatting just gets ignored.
    I've also tried having an empty cell with this startup macro
    Private Sub Workbook_Open()
    Worksheets("T&G Report").Range("H8").Value = Format(Date, "dd mmm yyyy")
    End Sub
    but that doesn't seem to have any effect either.
    Any suggestions?

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: date format 2000 vs 2003

    please check the format in that excel 2000 file.
    and also see what is in the formula bar of ths file

  3. #3
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: date format 2000 vs 2003

    Hi

    Don't know why it would do that, but your start up macro should change the number formatting of the cell, not the value:

    Private Sub Workbook_Open()
    Worksheets("T&G Report").Range("H8").NumberFormat =  "dd mmm yyyy"
    End Sub
    Richard
    Richard Schollar
    Microsoft MVP - Excel

  4. #4
    Registered User
    Join Date
    07-28-2009
    Location
    Newcastle
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: date format 2000 vs 2003

    Richard - thanks, it works. Not completely sure where I was going wrong, but it works now!

+ 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