Any way to align columns on character other than the decimal point?

H

Heather Mills

I have a column of pairings (3-5 7-10 25-2 etc.).

I'd like to create a table showing several columns of such paitings so
that they are all centered on the "-" (or whatever character I decide
to use as the separator).

Col 1 Col 2 Col 3
1 - 3 12 - 5 5 - 11
10 - 12 9 - 8 12 - 1
2 - 4 10 - 11 3 - 5

Centering doesn't work because some numbers have 2 digits.

I tried putting a required space (shift+space) as a place holder, but,
at least in this font (Calibri), it must be a different weight than
the numbers.

I tried using a zero and formatting it as hidden, but for some reason
that didn't work either, and it was ugly on the screen.

Any other ideas?

I can do it using a minispace font and required spaces, but I'd like
to use Calibri, if possible.
 
S

Suzanne S. Barnhill

Using a zero and formatting it as white (or the same as any background
color) will do. Two spaces will also usually approximate the width of a
numeral.

In this case, however, it should be unnecessary, as a decimal tab will align
on the hyphen or en dash. A decimal tab aligns on the first non-numeric
character (aside from the thousands separator). This can be the end of the
number, a decimal point, an asterisk, a closing parenthesis, or whatever:
the effect is that numbers will align on the last numeral in each string or,
in this case, the last numeral before the non-numeric character.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
H

Heather Mills

Using a zero and formatting it as white (or the same as any background
color) will do. Two spaces will also usually approximate the width of a
numeral.

In this case, however, it should be unnecessary, as a decimal tab will align
on the hyphen or en dash. A decimal tab aligns on the first non-numeric
character (aside from the thousands separator). This can be the end of the
number, a decimal point, an asterisk, a closing parenthesis, or whatever:
the effect is that numbers will align on the last numeral in each string or,
in this case, the last numeral before the non-numeric character.

Very nice. That works perfectly.

If I use these tabs in a table cell, I don't need the tab character.
In fact, entering a tab character (Ctrl-Tab) creates an empty line. Is
there some explanation for this? I've used tabs many times in tables
and always needed a tab character (I think).

The justification setting is also puzzling. If it's left-justified or
justified (left and right), then the tab setting works (without any
tabs).

If I change it to centered, it appears to center the text in the right
half of the cell (between the decimal-align tab and the right edge of
the cell. If I move the tab around, the text also moves. If I remove
the tab, the text is centered in the cell.

If I change it to right-justified, it appears to ignore the tab and
right justify as usual.
 
S

Suzanne S. Barnhill

Yes, if I hadn't assumed you had experience with using decimal tabs in
tables, I would have pointed out that left (or justified) alignment is
required and a tab character is not. If you have other tab stops in the
table cell, then you will have to experiment to figure out what is required:
I do this so infrequently that it's always trial-and-error for me because
there doesn't seem to be any particular rhyme or reason to it (I'm sure
there is, I just haven't figured out what it is).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

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