How do I repeat a string as many times as necessary to fill acell?

M

Mark A Tilley

Is there an easy way to repeat a string (say "+-") so that it repeats itself
as many times as necessary to fill cell?

From memory, I believe that Lotus 123 had some shortcut way (perhaps "\+-")
that did just this. Is there something similar in Excel?

Thanks

Mark
 
J

JE McGimpsey

Mark A Tilley said:
Is there an easy way to repeat a string (say "+-") so that it repeats itself
as many times as necessary to fill cell?

From memory, I believe that Lotus 123 had some shortcut way (perhaps "\+-")
that did just this. Is there something similar in Excel?

Format/Cells/Alignment/Text Alignment. Choose Fill from the Horizontal
dropdown.

OTOH, if you only want to repeat a single character, you can use

Format/Cells/Number/Custom *-

to fill whatever comes after the asterisk (in this case, a hyphen).

Note that since XL interprets + as the start of a formula (Lotus
compatibility), you'll need to prefix your +- with an apostrophe: '+-
 

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