Custom Cell Format problem

  • Thread starter Thread starter Minitman
  • Start date Start date
Rick Rothstein (MVP - VB) said:
Not entirely true... you can do a limited amount of text formating (but
nothing anywhere near what VBA's Format function can do). Put this custom
format string...

<<@>>

in the Custom Number-Format and anything entered in that cell will be
surrounded by double angle brackets. An even more complex example would be
this custom format string

#;(#);Z\E\RO!;W\h\at i\s \"@\"\?

which will print positive numbers with a leading plus sign, negative numbers
surround by parentheses instead of having a leading minus sign, zero will be
spelled out and, for any non-number, you will be asked what is it.

First magic and now plain trickery said:
Don't you just **love** those kind of flub-ups?

Can't live without them, unfortunately !

Regards,
Peter T

PS, in next post
the limitation in a cell's Custom Number
Format is that the @ stands for the entire contents of the cell

Indeed, shame
 
#;(#);Z\E\RO!;W\h\at i\s \"@\"\?
First magic and now plain trickery, what next <g>

See what you can learn to do by reading Harry Potter books.<g>

Just to clarify, the plus sign was accidentally omitted when I copied the
format pattern string from my spreadsheet to the posting I sent. The above
format pattern string should have been this one...

+#;(#);Z\E\RO!;W\h\at i\s \"@\"\?

so that the positive numbers would have the leading plus sign I said they
would.

Rick
 
Back
Top