Right align partial text in a text box

  • Thread starter Thread starter cchristensen
  • Start date Start date
C

cchristensen

Hello - is it possible, within a text box, to left-align part of a line of
text, and right-align another portion (as can be done in Word?) I have a
series of descriptions and a series of corresponding numbers and would like
to left-align the descriptions and right-align the numbers.
 
Not really, but you can simulate it.

Assuming you have your alpha data in range A2:A10, and your numeric data in
B2:B10, type the following **array** formula in C2.
=A2&REPT(" ",MAX(LEN($A$2:$A$10))+MAX(LEN($B$2:$B$10))+5-LEN(A2)-LEN(B2))&B2
Then copy down as needed.
This concatenates columns A & B, and guarantees that there at least 5 spaces
between the 2 data. Assuming the longest column A & longest column B are in
the same row, for example, then it would put 5 spaces.

NOTE: The important thing to use here is a font that has equal spacing for
every character, such as Courier New.

Hope this helps.
 
Back
Top