New sheet inserted has date format as default in all its cells

awagdarikar

Board Regular
Joined
Jun 20, 2008
Messages
115
Hello,

I have got a strange excel work book. In this workbook when ever I insert a new worksheet, format of all cells in this sheet is expected as General. However I find all cells in it are having date format.

I do not know why this is happening. I tried to crating a new wroksheet copying all data in this but this problem remains there.

Please help me,

Thanks,

awagdarikar
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
When your new worksheet is active, if you choose Format|Style what is the default style (usually Normal) and what is its number format (usually General)?
 
Upvote 0
Thanks for replying,

I do not know what it is. But I tried opening a new workbook by CTRL+N, it crerates a new workbook then I tried inserting a new worksheet in it. It is a normal one.

It creates problems only in this workbook,

Thanks,

awagdarikar
 
Upvote 0
When my new worksheet is active and I choose Format|Style I observe it is Normal and If I choose to see the number format it is Date (14-Mar-01)

awagdarikar
 
Upvote 0
Do you have any VBA code in the workbook? Right click the Excel icon to the left of File on the menu and choose View Code. In the window on the right do you see something like?

Private Sub Workbook_NewSheet(ByVal Sh As Object)
 
Upvote 0
No Andrew,

There is no such Private Sub Workbook_NewSheet(ByVal Sh As Object) seen. however I have macros in this workbook which are created (recorded and edited) by me. If you want this workbook to inspect I can send it your mail id,

Please confirm,

Thanks,
awagdarikar
 
Upvote 0
Simple:

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


Hello,

I have got a strange excel work book. In this workbook when ever I insert a new worksheet, format of all cells in this sheet is expected as General. However I find all cells in it are having date format.

I do not know why this is happening. I tried to crating a new wroksheet copying all data in this but this problem remains there.

Please help me,

Thanks,

awagdarikar
 
Upvote 0
Wish I found this yesterday, I was pulling my hair out all day! Thanks for the solution.

Question though - I get that it's applied to all cells by default, but if I apply formatting, shouldn't that overwrite the style? I selected all on each sheet and set the format to General, but each time I opened the workbook it was all back to time format.

So it's a random glitch in Excel? Has Microsoft commented? I though it might have been from one of my plug-ins, so I disabled all of them and it appeared to stop.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top