View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2174_] Rick Rothstein \(MVP - VB\)[_2174_] is offline
external usenet poster
 
Posts: 1
Default How to programmatically add a non standard custom cell format

"Rick Rothstein (MVP - VB)" wrote in
message ...
Firstly, to Rick
"Can you give us examples of the various type of values (0-9, 10-99,
100-999,
etc.) and show us how want them all to look? Also, can there be negative
values?"

Thanks for the interest but as you probably figured if one includes
negative
values and taking Excel's precision of 15. Then that would mean 15 * 2 =
30
conditional format combinations and 14 more I believe if precision is for
example 0.00000000000000123456789112345. I have probably got the numbers
wrong but throw in negative numbers and worse case scenario that is 88
conditional formats. Thats why I thought it was a bit ghastly and
discounted
it. I probably got the value extent wrong but you get my drift.


Why are you placing restrictions on what can and can't be done? In your
first post, you mentioned the possibility of using VBA code to accomplish
what you want... there are not very many restrictions on what you can and
cannot do with VBA code. I was not thinking of using conditional formats,
rather, I figured if the cell format I posted wouldn't work for you, then
I would attempt some event code to do what you want. The key for me (and
the other volunteers here I would guess) is to understand your question in
full. With that in mind, can you provide the example values and results
you want from them that I originally asked you for? And, if you would like
to handle negative values, indicate that and provide samples for them if
the results for negative values are not simply the same as for the
positive ones except for their minus signs.


Okay, I see you got it working using Peter's suggestion (which was roughly
what I had in mind for an event code solution)... Good! No need to post the
examples I asked about then.

Rick