0

I have a list of strings (names / description text) that I need to add 'filler' characters to.

The maximum string length is 32 - for any text under that (in characters) I need to add special filler characters - up to that limit.

EG:

Original String - 30char - ReallyLong String Name Example

Revised String - 32char - ReallyLong String Name Example**

What is the best way to do this either with excel / sheets on it's own OR with a formula?

Thank you for your time!

1 Answer 1

3

Add the characters then cut to 32 length.

=LEFT(CONCAT(A1,"********************************"),32)

3
  • 2
    Nice one @Brian, to make it even tidier: =LEFT(A1&REPT("*",32),32), you can leave out CONCAT as it serves no purpose in here, plus it's a function only available from office 365 insiders and office 2019 if I'm not mistaken. :)
    – JvdV
    Jul 15, 2019 at 20:08
  • 1
    @JvdV Cool Rept() function JvdV. Then I can satisfy my OCD with =IF(LEN(A1)<32,A1&REPT("*",32-LEN(A1)),A1) Did not realize concat() might be limited. Hopefully at least the fully spelled out concatenate() is available to all users.
    – Brian
    Jul 15, 2019 at 20:49
  • It certainly is available, but why a check for Len? It's irrelevant 😉
    – JvdV
    Jul 15, 2019 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .