"How To Excel" Mini-Tutorials
by TheExcelAddict.com
"Helping Average Spreadsheet Users Become Local Spreadsheet Experts"

Justify Your Text


Because Excel is used for such a wide variety of tasks you may occasionally find yourself typing paragraphs of text in your worksheets. Since Excel allows word wrapping in a cell, you can easily type a paragraph or more into one cell. However, there may be times when word wrapping is not practical because the increased row height also affects the adjacent cells. A way to avoid this is to type your paragraph into several cells down the column. If you have ever done this, no doubt, you have also had to make changes to your text or re-adjust the column width and then found yourself cutting and pasting text from one row to the next to make it fit on each line.

Another example would be if you copy some text from a web page or elsewhere and past it into your worksheet, you may find that the text is all in one cell, but you want to spread the text over several cells down the column.

Well, you'll be happy to know that there is a little-known option practically hidden in Excel that can be a godsend whenever you find yourself trying to reorganize text over several rows. It's called Justify.

Now let's see how Justify works...

For Justify to work, your text must be in one or more cells in one column. You can spread the text to display across several columns and rows but the actual text will be in the leftmost column only. You can also include blank cells (i.e. paragraph breaks) in your text.

To better understand how this works (it's really simple, believe me!) please follow along with this example.

  1. Open a new workbook.
  2. Type a couple of sentences in cell A5 or copy some text from a web page and paste (Edit, Paste Special, Text) it into cell A5. Go ahead. Try it now. When you paste the text, it should be in one column but will overflow into the blank columns to the right.

  3. Adjust the width of column A to 50.
  4. Now, highlight cells A5:A15.
  5. From the Edit menu, select Fill, and Justify. Like magic, the text will be distributed into the selected cells.

To see that work again, change the width of column A and repeat step 5. Isn't that cool?

As I said earlier, the text must be all in one column but, rather than adjusting the column width as in the example above, you can have the text display across several columns. Try this.

  1. Resize column A to it's original width.
  2. Highlight cells A5:D15.
  3. From the Edit menu, select Fill, and Justify. Notice that, although the text is still in cells in column A, it is now distributed across columns B to D.

Now, whenever you need to edit the text, it is a simple process to redistribute it so it fits in the range you've selected. This sure beats cutting and pasting.

A few things to keep in mind about Justify:

  1. The maximum number of characters you can have in one cell, for Justify to work, is 255. Extra characters will be truncated.
  2. If the range you select isn't large enough to accommodate the text when justified, you will get a warning message allowing you to abort if necessary, otherwise it may overwrite data in the cells below.
  3. When re-justifying (if that's a word), some versions of Excel may erroneously omit a space when rejoining text that was previously split.

    In Excel 2003, that's not a problem. It seems to work perfectly.


Why not print (CTRL+P) this tip and share it with your friends and associates?

Get more time-saving tips just like this one delivered to you by email every week in my FREE newsletter "Spreadsheet Tips From An Excel Addict". Subscribe at the www.TheExcelAddict.com/Newsletter.htm.
You'll be amazed how much time you'll save just by learning a few of these tips.

Copyright 2003 All Rights Reserved by Francis Hayes (The Excel Addict)

If you came to this page from my Excel Mini-Tutorials page, click here to close this window,
otherwise click here and you'll find lots more time-saving Excel tutorials like this one.