# Another Excel Question

**URL:** <https://boards.straightdope.com/t/another-excel-question/291065>\
**Category:** Factual Questions\
**Created:** [February 20, 2005, 9:33pm UTC](https://boards.straightdope.com/t/another-excel-question/291065 "2005-02-20T21:33:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Odinoneeye](https://avatars.discourse-cdn.com/v4/letter/o/97f17d/32.png) [@Odinoneeye](https://boards.straightdope.com/u/Odinoneeye)\
**Post date:** [February 20, 2005, 9:33pm UTC](https://boards.straightdope.com/t/another-excel-question/291065/1 "2005-02-20T21:33:31Z")

</div>

Hi,

I need to learn how to put dot leaders in excel.

The only way I can find is to manually type them which is a pain in whatever body part you care to name.

Is there an easier way?

Thanks.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [February 20, 2005, 11:57pm UTC](https://boards.straightdope.com/t/another-excel-question/291065/2 "2005-02-20T23:57:55Z")

</div>

Not real sure why you’d want such a tinhg in Excel. But if you insist here’s a technique …

Put the left part of the entry in a cell in a column, put the right part of the entry in the adjacent cell to the right, then put a formula in the next adjacent cell to assemble the result.

eg:  
A1= “Chapter 1”  
B1 = “Page 12” or just “12”  
C1 = “=A1&REPT(”.", 100-LEN(A1)-LEN(B1))&B1"

The 100 in there is the overall width of the result. Repeat this for as many rows as you need by makeing the data entry & copying the formula down. Finally, to print just hide the first 2 columns or leave them out of the print range, whichever makes more sense for yuor situation.

It’d be smartest to replace the literal 100 with an absolute cell ref (ie $A$1 format), so you could enter that constant in one cell and if/when you change it, all the entries width’s will expand / contract as needed.

This’ll only print pretty if you use a fixed width font. It’s not practical without resorting to VBA to compute the number of dots in a proportional font, and even if you did that, you’d still need a fractional space which excel isn’t going to be able to generate.  
Probably a better way to assemble a nice looking table of contents is to use a tool designed for that purpose: Word. You can easily embed the spreadsheet data in the Word doc & let each program do what it does best. I almost never print from Excel any more since it looks so crude by comparison.

Let the program designed for pretty printing and page formatting and stuff do that instead.

---

<div class="post-metadata">

**Author:** ![Odinoneeye](https://avatars.discourse-cdn.com/v4/letter/o/97f17d/32.png) [@Odinoneeye](https://boards.straightdope.com/u/Odinoneeye)\
**Post date:** [February 21, 2005, 3:16am UTC](https://boards.straightdope.com/t/another-excel-question/291065/3 "2005-02-21T03:16:01Z")

</div>

> [@LSLGuy](#):
>
> Not real sure why you’d want such a tinhg in Excel. But if you insist here’s a technique …

Because I have a client who’s paying me to do this.

Thanks for the info.
