View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default How to right-align text and numbers?

hi
your "text" custom format failed because you cannot appliy custom number
formats to text. you can change the font, size, style but that's it.
as to lineing up, you will just have to eye ball it and hope no one notices.

Regards
FSt1

" wrote:

For readability, I have set up the following custom formats, using a
non-proprotional font (Courier New) and right horizontal alignment
with zero indentation:

#,##0" "
"[ "#,##0" ]","[ "-#,##0" ]"

(There are two spaces between quotes, or a combination of one space
and one square bracket.)

Thus, cells with normal numbers line up with numbers enclosed in
square brackets line. That is, the right-most units digit and the
comma separators line up.

Additionally, I want the column titles (dates or text) to line up with
the right-most units digit of the numbers. I tried the following
custom formats:

mmmyy" "
Text" "

The date format works well.

But the text format fails. The text is flush with the right-hand cell
wall instead of being two "Courier spaces" to the left.

I have worked around the problem by using normal Text format and right
horizontal alignment with one indentation instead of zero.

But I don't know if I can count on one indentation being equal to two
"Courier spaces".

(If I can, where is that documented?)

I would prefer to use a custom format that is similar to the others;
that is, something following by two spaces in quotes.

Can someone tell me how to do that?

And if there is a better way to do this altogether, I am open to
different approaches.