How many formats????

G

Gord

How can i tell how many formats i have used in my
spreadsheet? I understand the spreadsheet can only handle
4000 formats. I need to know how many i have used .

Gord
 
N

Norman Harker

Hi Gord!

See:

http://tinyurl.com/ys2y8


Charles Williams discusses the problems and is pessimistic as to
getting a report on number used.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
J

Jim Rech

I do have a technique that I think would provide the answer, but the macro
is not "ready for prime time", Norman. But FYI the idea is to save the
workbook in XML format and then count the "Style" records. For this
purpose the "Style" records include not just the named styles but the
unnamed styles too (Actually they do have names like "S22", etc.). If the
OP sent me his zipped up file I could tell him what I found. I'd love to
try this on a file that has bumped up on the limitation, just to confirm my
technique is returning the true number (which is not something I've
"proven").
 
N

Norman Harker

Hi Jim!

Sounds like a great idea. I'll look forward to seeing the final
product.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
J

Jim Rech

Hi David-

Leo's macro deletes unused _number_ formats. That's fine, certainly cannot
hurt, but number formatting is just a part of what comprises a cell's
format.

The larger issue in the "too many different cell formats" problem has little
or nothing to do with _unused_ number formats. It has to do with having too
many combinations of formatting elements actually in use.

Or to quote from MSKB 213904:

"This problem occurs when the workbook contains more than approximately
4,000 different combinations of cell formats. A combination is defined as a
unique set of formatting elements that are applied to a cell. A combination
includes all font formatting (for example: typeface, font size, italic,
bold, and underline), borders (for example: location, weight, and color),
cell patterns, number formatting, alignment, and cell protection."

I call each of the combinations referred to in the quote a "style". A
"named style" (that appears in the Format, Style list) is a subset of the
total "styles". In your typical large workbook, with lots of formatting,
the named styles are just a fraction of the number of total styles.

So, again, it's not unused number formats, but total "styles" used that is
the problem in ""too many different cell formats". I wish I had an good
answer to this problem. My macro can produce a list of all styles used in a
workbook but that doesn't do a whole lot since there is nothing you can do
based on the list (well I guess it could be a warning about getting close to
the limit). I guess that's why MS's solution is to "use less
formatting".<g>
 
D

David McRitchie

Had forgotten that he was just aiming at number formats
http://www.mvps.org/dmcritchie/excel/slowresp.htm#formats
but that is probably the biggest piece of the pie that is hardest
to deal with.

So when you can tell us a number of used formats are we going
to be able to actually do something with the information other
than to see the level of the flood waters. Like perhaps where
that one use of a cell with turquoise shading, text format,
and a single border on the bottom actually is.

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
 
J

Jim Rech

Like perhaps where that one use of a cell with turquoise shading, text
format, and a single border on the bottom actually is.

Don't hold your breath<g>.
 
D

David McRitchie

Okay, I will take that to mean it will be sooner than Excel supports
more than 256 columns on their spreadsheets. I don't hold my
breath until something is installed and I'm ready to hit Enter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top