Monitoring the Number of Formats Defined

Written by Allen Wyatt (last updated July 1, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


3

Robert has lost way too many spreadsheets due to the "Too Many Formats" error message. He wonders if there is a way to monitor the running total in real time of the number of formats I have already created that will serve to give me a heads up, so to speak, of how close I am getting to the maximum allowable.

Getting the "Too Many Different Cell Formats" error message has been discussed, briefly, in a different ExcelTip:

https://tips.net/T10398

The problem can be vexing for those using large, complex workbooks or when using workbooks that have been extensively edited over long periods of time.

Unfortunately, there is no way to count the number of custom formats that Excel thinks are being used in a workbook. The reason is that Excel considers a format as any "unique set of formatting elements that are applied to a cell." That covers a lot of territory. You might think that VBA could access such formats as a collection, but that is not possible; Microsoft just doesn't make the format count available.

This means that the only way to avoid the problem is to take some sort of preventative measure. The best we've been able to find is the XLStylesTool, which you can find here:

https://www.microsoft.com/en-us/p/xlstylestool/9wzdncrfjptg

The tool is free easy to use. Run it periodically and it should minimize the problem, if not completely remove it.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13724) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Embedding TrueType Fonts

If you need to make sure that the fonts in your document can be used by another person or on a different system, you'll ...

Discover More

Adding Phrases to the Grammar Checker

Word's grammar checker dutifully tries to mark all the questionable grammar in your sentences. If you are tired of a ...

Discover More

Determining a Simple Moving Average

A moving average can be a great way to analyze a series of data points that you've collected over time. Setting up a ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Using a Single Instance of Excel with Two Monitors

Working on a computer system that has multiple monitors can help increase your productivity. If you want to work with ...

Discover More

Dividing the Screen Unevenly between Two Workbooks

When working with multiple workbooks, you'll typically want to resize the workbook windows so you can see the data from ...

Discover More

Keyboard Shortcuts for Inserting Rows

A common task when editing a worksheet is to insert rows in your existing data. This tip looks at ways you can accomplish ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

2020-01-17 08:06:17

Alex B

@GlennI haven't used it myself but this should give you some comfort on the XLStyles Tool.https://free-data-recovery.blogspot.com/2013/03/xlstyles-tool-clean-up-corrupt-excel.html#!/2013/03/xlstyles-tool-clean-up-corrupt-excel.htmlI thought the images were useful but the information you want is right at the bottom of the article under "XLStylesTool_ReadMe.txt"I normally just use a delete custom styles macro and have had no repercussions from that.(this without checking if the style is actually in use which the XLStyles tool indicates it does do)


2020-01-13 09:03:32

Glenn

Allen:

Could you give us a hint of what the tool will do? I'm hesitant to use something while being clueless about the potential effects. If, for instance, it removes all formatting, then I likely won't use it except in cases where it probably wouldn't matter anyway.


2020-01-11 19:35:59

Alex B

I am not sure that Robert quite understands the magnitude of his excel issue. You are not going to want to be monitoring how close you are getting to the maximum allowable. The maximum allowable in xlsx is 64,000. Your productivity will have declined way before you get anywhere near that number (due to spreadsheet bloat and the speed at which it runs)

My understanding is that your spreadsheet does not have to be actually using a style, the style just needs to be in the list of custom styles. You can count this using VBA.
If you end up using VBA to DELETE the custom styles just be sure NOT to use a “For Each” loop and to use “For ........Step -1”. (You are deleing from a collection and it runs much faster if you start from the end)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.