

So the macro had to cycle through every cell to build a list of used styles. This takes a bit longer because there is no record in excel of which styles have been used except in each cell. So I made another version of the macro to remove the unused styles. I found and modified a macro to remove all of the styles and the problem went away, but then so did some of the formatting. I was copying quite a few files into one when I got an error telling me I could not paste.Īfter much googling I found that the problem was the number of styles exceeded the capacity and it would not paste any data at all. All of the styles in the source file were being copied into the destination file, even if they were not in use. I came across something related to this a while back when copying the contents of one excel file to another. The solution is to transfer your data from the current workbook to a new workbook and then see if the problem occurs in the new one. The other possible cause is that the workbook file is corrupted in some manner. This is particularly true with colors and conditional formatting. If you are saving it in the older Excel 97-2003 format, then it is possible that the losses you are seeing are due to the formatting not being supported in the older format. As far as we can tell, the problem could be due to two different potential causes.įirst, you should make sure that your workbook is being saved in native Excel 2007/2010 format. There is no acknowledgement from Microsoft that it is a known problem (at least, as far as we can find), but it apparently is a problem shared by many people. They can't find a pattern, and were wondering if this is a known problem. They save and close the workbook the next time they open it, the formatting is gone.

The formatting includes fonts, colors, shading, borders, number formats, and so on. Several of them have intermittent problems with losing formatting. Jennifer is in an office with ten people, all using Excel 2007.
