ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Right align partial text in a text box (https://www.excelbanter.com/excel-discussion-misc-queries/207967-right-align-partial-text-text-box.html)

cchristensen

Right align partial text in a text box
 
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.

John C[_2_]

Right align partial text in a text box
 
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.
--
** John C **


"cchristensen" wrote:

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.


John C[_2_]

Right align partial text in a text box
 
This, of course, also assumes your linked cell is the desired cell :)
--
** John C **



"John C" wrote:

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.
--
** John C **


"cchristensen" wrote:

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.



All times are GMT +1. The time now is 05:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com