Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to pad cells to a fixed length in Excel?

How to pad cells to fixed length for a neat look while the data values you type differed in text length in Excel? In this article, you may get the solution. Pad cells to fixed length

Pad cells to fixed length

Pad cells to fixed length

To pad cells to a fixed length, you just need a simple formula.

Select the cells you want to use, type this formula =LEFT(A1&"*****",5), press Enter key, and drag fill handle over the cells as you need. In the formula A1 is the cell you use to fix length, * is the character you want to fill, 5 indicates to fix text length in 5 digits. See screenshot:

doc pad fixed length 11  shot arrow right  doc pad fixed length 21 

Tip: Here are some formulas also working, you can choose one of them as you need.


=A1 & REPT("*",5-LEN(A1))

=REPT("*",5-LEN(A1)) &A1

Remove Leading Zeros

doc delete leading zeros 03

Relative Articles:

Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.