bottom
Great ExcelTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > ExcelTips Home > Formatting > Cell Formatting > Decimal Tab Alignment

Decimal Tab Alignment

Summary: Microsoft Word allows you to set up all sorts of tab stops, including decimal tabs. Excel provides no way for you to do this same type of formatting, but there are ways to approximate decimal tab stops. This tip discusses some techniques you can use. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, and Excel 2003.)

If you have ever aligned numeric information in Word using decimal tabs, you know they can be very handy. The tabs even align text (with no decimal point) to the left of an assumed decimal point, with everything nice and tidy.

Unfortunately, Excel has no such similar feature as a "decimal tab." While it is very easy to get things lined up if they include decimals (at least if they contain the same number of digits to the right of the decimal), adding text into a cell can throw everything out of whack.

To closely approximate the behavior of decimal tab alignment, follow these steps:

  1. Select the cells you want to format.
  2. Choose Cells from the Format menu. Excel displays the Format Cells dialog box.
  3. Make sure the Number tab is selected. (Click here to see a related figure.)
  4. In the Category list, choose Custom.
  5. In the Type box, enter the following format:
         _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_._0_0_)
  1. Click on OK.
  2. Click on the Align Right tool on the toolbar.

The format you are setting up in step 5 allows for two decimal places and parentheses around negative numbers. In addition, for text it leaves room after the text for a period, two zeros, and the optional closing bracket. Step 7 is necessary so that Excel pushes text up to the right end of the cell. Since the format you specified leaves room for the decimal point and everything after it, the text appears to align just to the left of where the period would appear.

Understand that this is only an approximation of the decimal tab alignment offered in Word. There are still a few things you can't do. In Word, if you enter text and it is decimal aligned, and the text includes a period, then the period is aligned as if it were a decimal point. If you put a period in the text entered in a cell that is formatted as directed above, the period will not be treated as a decimal point.

Tip #2765 applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003


PivotTables Got You Perplexed? Learn the ins and outs of this powerful data-crunching tool. ExcelTips: PivotTables for the Faint of Heart makes it easy.

Helpful Links

Ask an Excel Question
Make a Comment

Tips.Net Home
Vital News Home

ExcelTips FAQ
ExcelTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

 

Great Info!

Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)