Too many different cell formats

Excel 'Too Many Different Cell Formats' Error — Real Fixes That Work

Excel caps unique cell format combinations at about 64,000. Hit that wall and it refuses to apply new styles. Here's how to clear it, fastest fix first.

You try to bold a cell, fill it yellow, or paste a style and Excel throws "Too many different cell formats." Congratulations, you've hit a hard ceiling Microsoft set in the 90s and never lifted. Excel caps a workbook at roughly 64,000 unique format combinations. Once your file crosses that line, every new style application fails.

The culprit here is almost always accumulated formatting bloat from years of copy-paste, repeated style changes, and files that started life in Excel 2003 (.xls) and got saved forward. I've seen it in finance models that get emailed around 40 times a quarter, and I've seen it in a 200-row spreadsheet where someone thought it was clever to color every cell individually.

Work through these in order. Stop when Excel stops complaining.

Fix #1 — The 30-Second Sanity Check (Try This First)

Before you do anything destructive, save a copy. Seriously. File > Save As and add -backup to the name. Every fix below can nuke intentional formatting if you're careless.

Now try this:

  1. Press Ctrl+A once in the affected sheet.
  2. Go to Home > Clear > Clear Formats.
  3. Try applying your style again.

If it works, you just had too many formats in one sheet. If it doesn't, the bloat is spread across other sheets or buried in the workbook's Styles collection, which is a separate beast. Move on to Fix #2.

Don't bother deleting empty rows and columns thinking that'll help. It won't. Excel stores formatting for the entire used range whether cells have data or not.

Fix #2 — The 5-Minute Styles Purge

This is the fix that actually clears the error for 90% of people. Excel keeps a hidden list of named styles — every time you do a format painter across cells, or paste from another workbook, a new style can get registered. Most of them are junk.

Clear unused styles

  1. Press Alt+F11 to open the VBA editor.
  2. Press Ctrl+G to open the Immediate window.
  3. Paste this and hit Enter:
For Each s In ActiveWorkbook.Styles
    If Not s.BuiltIn Then s.Delete
Next s

If that throws an error about a style being in use, run this instead:

For Each s In ActiveWorkbook.Styles
    If Not s.BuiltIn Then
        On Error Resume Next
        s.Delete
        On Error GoTo 0
    End If
Next s

Save the file. Try your style again. For most workbooks, this alone drops the format count by 30-50% and gets you back to work.

If that's not enough, force a rebuild

Sometimes the styles collection is fine but the underlying format table is corrupted. The nuclear-but-safe move:

  1. Create a new blank workbook.
  2. Go back to the problem file, right-click each sheet tab.
  3. Choose Move or Copy, tick Create a copy, and send it to the new workbook.
  4. Save the new workbook, delete the old one.

This rebuilds the format table from scratch. It'll catch any hidden corruption too. I've watched this fix workbooks that VBA style purges couldn't touch.

Fix #3 — The 15-Minute Deep Clean

If you're still seeing the error, you're dealing with a genuinely enormous workbook — think 50,000+ rows with conditional formatting stacked on top of manual formatting on top of table styles. This is where most consultants give up and tell you to split the file. Don't split it yet. Try these in order.

Kill conditional formatting you don't need

Conditional formatting values count separately from cell formats in some Excel versions, but they interact with the overall format table. Every CF rule that applies a unique combination adds to the count.

  1. Go to Home > Conditional Formatting > Manage Rules.
  2. Set the dropdown to This Worksheet.
  3. Delete any rule that isn't actively doing something useful. Dead CF rules from three years ago are common.
  4. Check every sheet. CF rules are per-sheet and hide easily.

Standardize your formats

Real talk: if you've got 60 shades of blue and 15 fonts in a workbook, you're the problem. Pick a palette. Five or six fill colors, two fonts, three border styles. Apply them through Cell Styles (the ribbon styles gallery) instead of ad-hoc formatting. Styles reuse the same format entry. Manual formats don't.

To convert an existing mess into clean styles, select a range, apply a named style from the gallery, then re-apply your overrides one at a time. Tedious, but it drops your format count dramatically.

Convert to .xlsb and back

Save the file as .xlsb (Excel Binary Workbook), close it, reopen, and save back as .xlsx. The binary format rewrites the format table and drops orphaned entries. I've seen this recover 20,000+ format slots on bloated files. It's a workaround, not a cure, but it buys you room.

Last resort — split the workbook

If you're at 64,000 formats legitimately (rare, but it happens with dashboards), you've got two options. Either split into multiple workbooks linked by external references, or move to Power Query / Power Pivot, which store data outside the cell format model entirely. Honestly, if you're maintaining a format-heavy workbook at that scale, you should've moved to Power BI two years ago.

Why This Error Exists

Excel's internal format table is a fixed-size structure inherited from Excel 97. Microsoft never raised the cap because doing so would break backward compatibility with older files and third-party tools. The limit is documented as 64,000 unique formats per workbook, but in practice you'll see the error pop around 55,000-60,000 depending on Excel version and installed add-ins.

Excel VersionFormat LimitNotes
Excel 97-2003 (.xls)~4,000Much lower ceiling, common source of legacy bloat
Excel 2007+ (.xlsx)64,000Still not raised as of Excel 365
Excel for Mac64,000Same limit, worse error messaging

Preventing It From Coming Back

You'll save yourself pain later if you follow a few rules:

  • Use Cell Styles, not manual formatting. Styles reuse entries, manual formats create new ones.
  • Never use the Format Painter on whole columns. Ever.
  • When pasting from another workbook, use Paste Special > Values or Paste Special > Formats, not smart paste.
  • Retire old files. Rebuild big models every 12-18 months from a clean template.
  • If you're building dashboards, move to Power Query. It sidesteps the format model completely.

None of this is glamorous. But it's cheaper than watching a VP's quarterly model crash at 11pm on the night before board review.

Related Errors in Software – Microsoft Office
PowerPoint crashes when inserting online video – real fix Excel Crashing on Network Files? 3 Fixes That Actually Work The file is corrupt and cannot be opened Word's 'File Is Corrupt' Error on .docx Files: What's Really Wrong DXGI_ERROR_INVALID_CALL Fix DirectX CreateTexture2D Failed Error in Games

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.