Professional Documents
Culture Documents
How To Right Align The Text With Leading Spaces in Excel 2010
How To Right Align The Text With Leading Spaces in Excel 2010
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