setting up columns

G

grammy

trying to set up a file with information for electronic transfer of data.
The columns needs to be set at specific width, so I need to be able to add
spaces before text, i.e. " left". Is there a way to do this without
having to manually add spaces?
 
K

Kevin Vaughn

Not sure what this has to do with the width of the column, but if you need
the cell to contain a certain number of characters, say 30, you could try
something like this:

=REPT(" ", 30 - LEN(B8)) & B8

You may want to use a helper column and then afterwards do a copy/paste
special values.
If you just need the column width to be a certain number, select the column,
and hit format column width and type the number you need it to be.
 
A

Arvi Laanemets

Hi

Am best you separate data entry and transfer data. On input sheet, enter all
values aot padded. On transfer sheet, calculate values from according cells
on input sheet - like:
=IF(Input!A2="","",RIGHT(REPT(" ",20) & Input!A2,20))


Arvi Laanemets
 
G

grammy

Thanks, this is exactly what I needed.

Kevin Vaughn said:
Not sure what this has to do with the width of the column, but if you need
the cell to contain a certain number of characters, say 30, you could try
something like this:

=REPT(" ", 30 - LEN(B8)) & B8

You may want to use a helper column and then afterwards do a copy/paste
special values.
If you just need the column width to be a certain number, select the column,
and hit format column width and type the number you need it to be.
 
G

grammy

Kevin, this justifies the data to the right. What do I change to justify it
to the left?
 
K

Kevin Vaughn

Try this one instead:

=B8 & REPT(" ", 30 - LEN(B8))

This will put the spaces at the end.
 
Top