Macro to increase String Length?

A

aronnov

anyone know of a macro or a way i can take a column and make it a fixed
character length? say it's populated with numbers all the way up to "1000"
but i want it so it's always 12 characters long. "1000 ". the
number 1 would like like "1 ". any ideas?

Aaron
 
N

Niek Otten

Hi Aaron,

In B1:
=A1&REPT(" ",12-LEN(A1))
Copy down

If you need it to be column A, Copy, Paste special, check Values

--
Kind regards,

Niek Otten


| anyone know of a macro or a way i can take a column and make it a fixed
| character length? say it's populated with numbers all the way up to "1000"
| but i want it so it's always 12 characters long. "1000 ". the
| number 1 would like like "1 ". any ideas?
|
| Aaron
|
|
 
C

CLR

Select the column > Right-click > ColumnWidth > 12 > OK.......

Select the column > Right-click > FormatCells > AlignmentTab > Horizontal:
Left

Vaya con Dios,
Chuck, CABGx3
 
Top