You are on page 1of 1

How to right align the Text with leading spaces in

Excel 2010
Formula:
=IF(LEN(B2)<A2,REPT(" ",A2-LEN(B2)),"")&B2
Where A2 has the final length of the string. B2 has the string to be right aligned.

For Eg :
A1 = 15
B1 = ABCDEFGH
Output =

ABCDEFGH

You might also like