Excel 2007 spontaneously formats entire work book in date format -- seems to be a bug -- is there a solution?

Anonymous
2010-02-09T18:26:09+00:00

Hello, I am having a problem with Excel 2007 which I infer other people also have. In a large workbook, that has been in use for some time, suddenly one finds that virtually the entire workbook has formatted every cell as a date.  Here are some web references indicating that other people are having the same problem.

http://www.eggheadcafe.com/software/aspnet/33427643/default-cell-format-chang.aspx

http://www.pcreview.co.uk/forums/thread-3620548.php

If this is not a bug, it is an unfortunate aspect of the user interface that so many people are running into it with no understanding of what they have done that caused it to happen.  Is there some solution?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-02-10T14:14:27+00:00

This bug has been posted in many forums. Apparently, the number format in the NORMAL style spontaneously changes from General to this date format ([$-409]m/d/yy h:mm AM/PM;@). This typically happens in shared workbooks, but I have seen it happen in one of my workbooks...which was not shared.

Since a change to the NORMAL style impacts every cell that has not been specifically formatted, the end result is seemingly devastating.  The fix for any particular workbook, however, is relatively easy.

To resolve that issue:

• Home.Cell_Styles

...Right-click: NORMAL...Select: Modify

...Click the Format button

...Number_Tab....Category: General

To my knowledge Microsoft has not addressed this XL2007 issue via an update or patch.


Best regards,

Ron Coderre

Microsoft MVP - Excel (2006 - 2010)

P.S. If any post answers your question, please mark it as the Answer (That way it won't keep showing as an open item.)

Was this answer helpful?

100+ people found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2010-02-10T13:55:04+00:00

Hi,

Possible causes of the problem are:

1.       Conditional formatting rule may be applied to the cells.

2.       A custom cell style may be applied to a cell / cells.

3.       Default cell style Normal may be modified for number from general to date.

4.       Possible file corruption.

Solution to the specified problems:

Note: Please try these troubleshooting steps on a duplicate file created by using “Save as” option on the original file.

Method 1: Finding the Formatting applied across the sheet and Clearing Conditional Formatting.

1.       Click on ‘Conditional formatting’ under Home tab and then on ‘Manage Rules…’

2.       Now select’ This Worksheet’ for ‘Show formatting rules for:’

3.       Check if  any rules are created for ‘This worksheet ‘, if yes then open the rule and see whether the rule is set to change the cell format to other format and if needed change/delete the rule according to your requirement.

Method 2: Modifying the default /custom style in Excel.

1.       Click ‘Cell Styles’ under Home tab and check if you have a Custom style created,

If yes then right click on the Custom style created, select modify and click format, now select General under Number tab, click OK and OK again on the Style window.

If No then right click on Normal and check if Number has General format if not then select modify and click format, now select General under Number tab, click OK and OK again on the Style window.

Method 3:  Try to repair the file.

Note: Do not try to repair the original file, repair a copy of the file instead.

  1. Open Excel, click the office button > Open > In the Open dialog box, select the file you want to open, and click the arrow next to the Open button. Click Open and Repair, and then choose Repair to repair the file.

Check for more information on file repair techniques and recovering data from the corrupted file by clicking on the link below.

http://office.microsoft.com/en-us/excel/HA100970171033.aspx?pid=CH100948241033

As an alternate, select the cells/range where the data is displayed incorrectly and click on clear format to clear any unwanted formatting in the cell.


Niranjan I K Microsoft Answers Support Engineer.

• We appreciate your participation in MS Forums, Help us understand your needs better. To share your valuable Feedback please Click here.

Was this answer helpful?

50+ people found this answer helpful.
0 comments No comments

102 additional answers

Sort by: Oldest
  1. Anonymous
    2015-10-06T06:48:11+00:00

    Thanks a lot i think this has solved the problem.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-10-07T16:04:00+00:00

    Thank you so much. I don't thing this would be a definitive solution, but it is an instantaneous solution when it happens. It seems that best prevention is to set format to any cell with numbers (avoiding the "Default" cell style).

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-10-07T17:29:34+00:00

    I ran into this issue many years ago in Office 2007 and unfortunately MS failed to fix it in 2010 and now in 2013.  That's what I call customer support.

    Anyway, I went to another of my Excel online groups and was provided this script that I now include in everyone of my large workbooks.

    Sub CleanStyles()

    Dim sty As Style, wbTemp As Workbook

    ' First, remove all styles other than Excel's own.

    ' they may have arrived from pasting from other workbooks

    For Each sty In ThisWorkbook.Styles

       If Not sty.BuiltIn Then sty.Delete

    Next

    'Second, revert the remaining styles to Excel's default for a new workbook

    Set wbTemp = Workbooks.Add

    Application.DisplayAlerts = False

    ThisWorkbook.Styles.Merge wbTemp

    wbTemp.Close SaveChanges:=False

    Application.DisplayAlerts = True

    End Sub

    I don't know if it has been mentioned, but the spontaneously changing formats happens to every cell not given a specific format in every worksheet in the workbook.  That was a shock.

    Since the large workbooks I built have been around since 2007 whenever I build a similar one, I just make a copy of the latest one and most of the time I don't have any problems with the formatting spontaneously changing on me.  In the rare event that it does, I just run the above macro and everything is hunky dory.  I put this macro in a module along with other more specific macros.

    I hope this helps folks so that you don't have to keep resetting the formats by hand.

    George

    Was this answer helpful?

    0 comments No comments