bug(?) formatting of entire worksheet changes unexpectedly

storm8

Active Member
Joined
Apr 7, 2010
Messages
327
In Excel 2013 x64 (EN; CZ locale) I have this funny bug. I work on a large vba project and sometimes when I open it, every cell in every workbook that had default formatting now has this numberformat (shown as "Accounting")

"_-* #,##0.00 [$Kč-405]_-;-* #,##0.00 [$Kč-405]_-;_-* ""-""?? [$Kč-405]_-;_-@_-"

its seems that this formatting is assigned to styles --> Normal and it just messes up everything (pivots, slicers...) and cannot(!) be undone.

I have made some routines to check for this error on workbook.open and workbook.close and I also have file versioning. I check for the error regularly on every worksheet change, but it never comes up, nor does it whenever I close the workbook, so Im having hard time detecting when it occurs.

Sometimes when I try to open the workbook its just all messed up. When I go trough the versions, couple of them back still has the error which means it was already saved with it.

All I could figure out so far is that it sometimes happens when I try to copy some cell and paste it elsewhere (but later it works fine)

I'm 99.9% sure that my code is not causing it by accident or purpose. Now I just found the problem on different workbook that might have been opened at the same time. If you're interested, have a look here https://dl.dropboxusercontent.com/u/1094828/wrong_numberformat.xlsx

I'd really appreciate if anybody can suggest what might be the cause
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I had the same problem with excel 2013. I re-built the document from scratch and it never happened again. The workbook was quite complex and I assumed it had become corrupted.
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,311
Members
449,080
Latest member
jmsotelo

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