+ Reply to Thread
Results 1 to 8 of 8

Too Many Cell Formats!

  1. #1
    Forum Contributor
    Join Date
    11-13-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    279

    Too Many Cell Formats!

    Does anyone understand this hideous hideous bug in Excel 2003 or more modern versions?

    Thanks

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Too Many Cell Formats!

    >>Does anyone understand "Too Many Cell Formats" error message

    Microsoft does.

    If you have more than 4,000 different kinds of cell format in an Excel 2003 application (64,000 in later versions) it uses up allocated resources and the application freaks out.

    Simplify! There are some tools to do so (an add-in etc) in the linked support question.

  3. #3
    Forum Contributor
    Join Date
    11-13-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    279

    Re: Too Many Cell Formats!

    thanks for the link and I have read it but it doesn't solve the problem. Because I have highlighted the entire workbook, pressed ctrl 1, set all cells to the same format, and cleared all the colours, yet it still cells too many formats! ridiculous! Any ideas? thanks

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Too Many Cell Formats!

    Got a lot of charts?
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Contributor
    Join Date
    11-13-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    279

    Re: Too Many Cell Formats!

    none, only numbers is all

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Too Many Cell Formats!

    You could try changing all of the cells to style Normal.

  7. #7
    Forum Contributor
    Join Date
    08-17-2009
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Too Many Cell Formats!

    I will try to explain this to the best of my knowledge. Apparently when you switch version of excel 2003 to 2007 etc. it corrupts the formats. So removing formatting is futile. Each time you copy the corrupt formats continue to stack. Once you reach the limit of styles/formats it prevents you from copying or adding additional formating and make make your file crash.

    I have an add in that I found on the web that I can no longer find the link. This add-in was originally created by Andrew Keeler for non commercial purposes. This add-in removes corrupt styles. This has worked wonders for me but I can not claim credit for it. All Thanks should go to Andrew!!

    I can not seem to attach an .xlam file so here is the code.

    Sub RemoveTheStyles(control As IRibbonControl)
    Dim s As Style, i As Long, c As Long
    On Error Resume Next
    If ActiveWorkbook.MultiUserEditing Then
    If MsgBox("You cannot remove Styles in a Shared workbook." & vbCr & vbCr & _
    "Do you want to unshare the workbook?", vbYesNo + vbInformation) = vbYes Then
    ActiveWorkbook.ExclusiveAccess
    If Err.Description = "Application-defined or object-defined error" Then
    Exit Sub
    End If
    Else
    Exit Sub
    End If
    End If
    c = ActiveWorkbook.Styles.Count
    Application.ScreenUpdating = False
    For i = c To 1 Step -1
    If i Mod 600 = 0 Then DoEvents
    Set s = ActiveWorkbook.Styles(i)
    Application.StatusBar = "Deleting " & c - i + 1 & " of " & c & " " & s.Name
    If Not s.BuiltIn Then
    s.Delete
    If Err.Description = "You cannot use this command on a protected sheet. To use this command, you must first unprotect the sheet (Review tab, Changes group, Unprotect Sheet button). You may be prompted for a password." Then
    MsgBox Err.Description & vbCr & "You have to unprotect all of the sheets in the workbook to remove styles.", vbExclamation, "Remove Styles AddIn"
    Exit For
    End If
    End If
    Next
    Application.ScreenUpdating = True
    Application.StatusBar = False
    End Sub

    Hope this helps.

  8. #8
    Forum Contributor
    Join Date
    11-13-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    279

    Re: Too Many Cell Formats!

    wow will try it out thanks very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] PasteSpecial with number formats but without conditional formats or borders
    By bodhi808 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2013, 09:58 AM
  2. Problem copying Page formats and print formats to another workbook
    By Chrisgeni in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 08:05 AM
  3. Two many different cell formats
    By kurian.soumya in forum Excel General
    Replies: 1
    Last Post: 04-03-2008, 03:46 PM
  4. [SOLVED] Copying formats - column widths, formats, outlining to worksheets
    By DavidBr318 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2005, 09:05 AM
  5. Formats: Too many different cell formats error message
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2005, 10:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1