Another Excel Question

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.

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.

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

Thanks for the info.