How do I center numbers in a cell, but align by decimal?

J

Juliue

I would like to keep numbers near the center of a long cell, but align the
numbers by decimal. Is this possible?

Thank you!
Julie
 
S

Shane Devenshire

Yes it is possible.

1. Format the cells to the same number of decimal places.
2. Click the Increase Indent button
3. Click the Right align button
 
M

MyVeryOwnSelf

I would like to keep numbers near the center of a long cell, but align
the numbers by decimal. Is this possible?

There's probably a better way, but here's one that seems to work.

If there are at most three decimal places, use a helper column with this
formula:
=TEXT(A1,
IF(MOD(A1,1)=0,"#. ",
IF(MOD(10*A1,1)=0,"#.# ",
IF(MOD(100*A1,1)=0,"#.## ",
"#.###"))))
Use Courier font, or another having fixed-width characters.

For more or fewer decimal places, modify accordingly.

To adjust the horizontal placement in the cells, use
Format > Cells > Alignment > Horizontal > Left indent
and set the "indent" parameter to taste.

(I have Excel 2003.)
 

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