Office challenge: How do you display leading zeroes in Excel?

Learn the answer to last week's Word challenge and test your Excel skills in this week's challenge.

Leading zeroes in a text cell are easy—you just type them if the input cell is a Text-formatted cell. In contrast, if you depend on the default format, General, Excel won't display leading zeroes in a numeric value. That's because leading zeroes just don't make sense in a numeric value. You can have it both ways though. How would you get Excel to display leading zeroes in a Number-formatted value?

Last week we asked…

Why won't my right-aligned text in my footer align properly after I change the right margin? It's a bit of a trick question. Using the special tabs in the header and footer sections does help you quickly center and right-align text, but the results aren't dynamic. That's because you can't change the margin for the header or footer sections. The problem really has nothing to do with tabs or legacy formatting that you don't know about.

My solution was to insert a table into the footer. Doing so won't change the header/footer's margin, but it gives the illusion of doing so. Let's take a look at a quick example:

  1. Open the footer section of any document.
  2. Insert a three-column, one-row table.
  3. Using the alignment tools, center and right-align the text in the second and third columns, respectively.
  4. Right-click the table's move handle (the four-arrow icon at the table's top-left edge).
  5. Choose AutoFit from the resulting context menu and then select AutoFit to Window.
  6. You can also turn off the cell border display if you like.
  7. Close the footer section.

When you change the document's margins, the table in the footer will adjust accordingly—the AutoFit to Window property sees to that. Notice how much wider the margins are in the following figure. You're not actually changing the footer's margins, so if there's anything else in the footer, it won't update.