开发者

In Excel how to fill remaining cell with "~" after name for a specific character size of 15

In Excel 2003 I have a positional file and I want to space fill with a delimiter of "~" for 15 total characters. How can I ensure that each first name has exactly 15 characters prepended with "~" at the end for space fill开发者_高级运维. I tried to do this in custom format mode, but it doesn't work correctly.

Examples:

SALLY~~~~~~~~~~
TOM~~~~~~~~~~~~
FRED~~~~~~~~~~~

etc...


Alternative;

=A1 & REPT("~", 15 - LEN(A1))


Let's say the names are in column A

Put this in cell A2 =LEFT(A1&"~~~~~~~~~~~~~~~",15) and drag it down

I'm just adding fifteen squiggles to the right and then cutting it down to the leftmost 15 characters to give you equal widths.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜