• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Rept function

Ri0

New Member
Would it be possible to add a separator in the rept function so that my data would show 5 I's then a space, then 5 more I's?


=rept("I",10)

IIIII IIIII


instead of

IIIIIIIIII
 
SirJB7


We are on the right path.


I want always to only have 5 I's and then a space.


so if a cell has 13 it would look like IIIII IIIII III
 
Hi, Ri0!

Glad you solved it. Thanks for your feedback and welcome back whenever needed or wanted.

Regards!
 
I just solved it, how did you know?


=REPT(REPT("I",B2/(B2/5))&" ",B2/5)&REPT("I",MOD(B2,5))
 
Hi, Ri0!

I knew it because that with the trick of the chained REPT your original question was solved. You didn't mention firstly a 13 length string. But glad you solved it too.

Regards!
 
Hi ,


Try this :


=REPT(REPT("I",5)&" ",INT(A1/5))&REPT("I",MOD(A1,5))


where A1 contains the number of repetitions that you want.


Narayan
 
Back
Top