Center Table Columns
If you’re dealing with financial tables full of columns of numbers you will know how hard it is to get the numbers to align as needed in InDesign.
Numbers in columns need to be centered. But not really centered. They need to look centered, but perhaps the decimal points need to align. Or maybe the entire column should be centered on the longest number in the column and then all other numbers should be right-aligned to that longest number?
Are you tired of fiddling with InDesign’s limited choices to fix number alignment in table columns? (Basically your options are limited to plain center, or you can fiddle around with a decimal-alignment in the tabs panel. Neither are much good or much fun!)
Sound familiar? Then Center Table Columns is the solution for you!
An easy-to-use interface makes this InDesign script the best way to work with financial or numeric data in tables. Use it to easily:
- Center the longest line (or the first line) in a column, then right-align all other numbers to that number
- Align the decimal points (US and European style supported) of all numbers in a column to the longest, centered number in a column
- Align the columns to any user-selected character
- Create “outdents”: If some numbers are starred, center all the numbers but hang the stars or reference indicators to the right of the column of numbers
- Works with columns of numbers or columns of text, or mixed columns
Center Table Columns is very easy to use. Just select one or more columns (or parts of a column) in a table and run the script. Play around with the options until you are happy with the results.
In the following example, Center Table Columns has been used to right-align all numbers to the longest number in columns 1 and 2, and to the first number in column 3. Asterisks have been allowed to outdent:
Janine Comes
May 14, 2019 8:59 pmHello,
Will this work with dollar signs ($), meaning will it align all $’s and then on decimal point, even if one didn’t have a decimal (whole number)? For example:
$ 99
$199.50
$ 12.50
Thanks,
Janine
Ariel
May 14, 2019 9:13 pmHi Janine,
If you set it to decimal-align, it will indeed align all the numbers to the right on the decimal point, and if a number doesn’t have a decimal point (like the $99 in your example) it is smart enough to assume that there is an invisible decimal point after the 99, so yes, everything will be aligned properly.
As for the dollar-signs that are aligned to the left, it won’t do anything special there, meaning, that everything will be aligned on the decimal, and wherever the dollar ends up that is where it will be. So if you need the $’s to align, you could try inserting a special “figure space” in InDesign. The figure space (if you’re not familiar with it) is meant to be the space of a single digit in the font. So add a figure space before 99 and before 12.50 and the dollars should line up…