Why does the Normal Style change from General to Dates on its own?

P

PeteeWJ

Periodically in several different Excel 2007 files I use, I will open the
file and the Normal Style will have change its number formatting on its own
from General to Dates. Sometimes simply changing the formatting of the
Normal Style back to General returns the workbook back to normal, but many
times I have to manually go through all the various different cells that are
in the workbook and change the formatting back to General from Date. This
apparent bug in Excel 2007 has occurred again in a very large file I use
(150+ worksheets) and it is going to be a massive undertaking to correct the
number formatting in this file. Why does Excel 2007 change the Normal Style
to something other than General on its own?
 
P

PeteeWJ

Hi Jan,

There are a total of 10 custom styles in this particular workbook. I
actively watch what shows up in there and regularly delete any unnecessary
custom styles that show up. This file in particular is just the extreme
example of when this has occured. There have been several instances of the
Normal Style changing in files that have far fewer worksheets and custom
styles.

Thanks,
 
M

mjm_cm

Jan,

Have same problem with ‘General’ number format being changed to date format
upon opening a saved workbook. First time I've seen it. File is XL 2007
..xlsm, approx 10MB, 15 sheets, and some contain defined tables. File has VBA
modules to import .csv data, cut/paste various ranges to/from temp sheets,
and perform calculations. My code applies formatting to certain ranges but
does not intentionally apply or alter pre-defined styles. I have been
actively building and running code in the file for over a month with no
problem until today.

After reading several blogs I confirmed that the number format of the
default 'Normal' style in this workbook had been changed to date format
([$-409]m/d/yy h:mm AM/PM;@). I reset it to 'General' and some of the broken
cells/columns then displayed correctly.

Noticed 8 custom styles had been defined (not intentionally by me), all
which began with the word Normal (Normal2, Normal3, Normal_Sheet1, etc). I
deleted the custom styles one by one and most sheets/cells were fixed.

Only one column on one sheet was not fixed by the above. I checked the cell
style and Excel said it was 'Normal', but I had to manually change the number
format on those cells back to 'General'. Tried to figure out what was
special about that column, then I remembered how I populated it yesterday:

1) Inserted a new worksheet and pasted in some data from Access.
2) Used VLOOKUP formula on destination sheet pointed to the new sheet.
Lookup_Value was text. Table array was 2 columns, and second col contained
numeric values to return.
3) Copied destination cells containing the VLOOKUP results and
special-pasted values over the formulas. Believe the numbers displayed
correctly before I saved the file yesterday, but am not 100% sure since it
was only one column on one sheet and I may not have looked at it last.

Perhaps yesterday's process of pasting somehow confused Excel. The affected
styles all seemed to be derived from ‘Normal’. Once ‘Normal’ was broken, all
the others followed…?

Hope this info helps someone find a solution. Guess for now I’ll have code
delete any unauthorized styles.

Thanks for your MVP contribution to Excel users.

mjm_cm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top