Help

Fill with spaces to reach a certain number of character

Topic Labels: Formulas
1015 1
cancel
Showing results for 
Search instead for 
Did you mean: 
albiz94
4 - Data Explorer
4 - Data Explorer

Hi everybody, I'm trying to come up with a formula that would add after some text (taken from another field) the number of spaces needed to reach a total number of character.
Let's say I have to get to 10 total character, starting from the text from a field name "Text".

If text is "ab" I would need the formula to add 8 spaces after "ab" in order to reach 10 total characters

If text is "abc" the formula should add 7 spaces after "abc" to reach 10 total characters, and so on.

Is this possible?

1 Reply 1

Yeap it is

Screenshot 2023-03-10 at 10.20.53 PM.png

And the formula used:

Name & 
REPT(
  " ",
  10 - LEN(Name)
)