format to a specific number of spaces

T

tallguy2u

I need to format general content aligned left cells to add spaces after the
content so that the general content and the spaces after that content are
equal to a specific number.

For example:
total = 10
content = x00xxx
cell value = x00xxx****
where the *'s indicate a space

The number of content characters may vary from 1 to 10 in the above example
 
J

Jacob Skaria

In A1 if you have the value try the below

=A1&REPT("*",10-LEN(A1))

If this post helps click Yes
 
T

tallguy2u

Thanks, I generated an extra column with that method containing the correct
spacing, but the formula worked. I'm using this to generate a flat file for
EDI purposes, and was hoping there might be a way to do the same thing with a
conditional formatting rule in order to avoid the extra column that a formula
requires, but at least now I'm just a copy and paste away.

Thanks again
 

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