Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there anything in a custom formatted formula which defines the text alignment?

I know the different parts of the formula is numbers, negative numbers and so on, but I need to set the alignment.

Example:

_*# ##0_;_*(# ##0)_;_*"-"??_;_@_
share|improve this question
    
you want it aligned how? the custom format you show above is close or far from what you want? –  datatoo Feb 9 '13 at 1:08

3 Answers 3

up vote 3 down vote accepted

While it is not possible to explicitly set the cell alignment using a custom format, you can achieve the same effect using the Repeat Characters syntax in the custom format. This syntax is simply the * character followed by the character that you want to repeat, in this case presumably the space character.

For example, the simple comma-separated number format "#,##0" can be made to align left by changing the format string to "#,##0* ".

Taking the example further, you could have number entries align left and text entries align right using the custom format string "#,##0* ;;;* @".

share|improve this answer

Alignment cannot be set in a number formatting string. By default, numbers are right-aligned and text is left-aligned. To change these, you need to use the alignment commands, either on the toolbar/ribbon or on the alignment tab of the format dialog.

share|improve this answer

Not exactly. I have to agree with @teylyn but you can do something that you might be able to adapt.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.