Limiting Characters in a cell and adding spaces to fill the remain

M

Melissa

Sorry not sure if subject title is clear.

I need to have only 15 characters in a cell. If the characters in a cell are
less than 15.. i need there to be spaces after the characters to make up 15
in total.

Does this make sense ? can it be done ?

Thanks
Mel
 
A

Ag

Assuming that column A contains all the information you can create
column B as per your mail by using the following fomula in cell B1 and
copying it subsequent rows
=IF(LEN(A1)<15,A1&REPT(" ",15-LEN(A1)),LEFT(A1,15))
 
D

Dave Peterson

Can you use a formula in another cell?

=left(a1&rept(" ",15),15)

This will truncate the value in A1 if the length is greater than 15, too.
 
M

Melissa

Thanks for the quick reply.

How do i check that it has worked. It is showing the result in a new cell
but how do i turn it from a formula to just characters
 
M

Melissa

I just figured it out !! thanks !!!!!

Melissa said:
Thanks for the quick reply.

How do i check that it has worked. It is showing the result in a new cell
but how do i turn it from a formula to just characters
 
M

Melissa

Thank you so much !! worked perfectly ! saved me hours (days) of work .. (
19000 x 3 cells)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top