Tellsheet
HomeExcel Guides › Pad Text to a Fixed Width in Excel

How to Pad Text to a Fixed Width in Excel

Fixed-width exports, aligned code lists, and system IDs all need every value the same length — padded with zeros, spaces, or dashes. Here's how to pad a column to a set width, on either side.

Last updated: August 2026

ValuePadded (width 6)
7000007
88000088

Method 1 — REPT + LEN

  1. Left-pad to 6 with zeros: =REPT("0",6-LEN(A2))&A2.
  2. Right-pad instead: =A2&REPT("0",6-LEN(A2)).
  3. Guard long values: =IF(LEN(A2)>=6,A2,REPT("0",6-LEN(A2))&A2) — otherwise REPT gets a negative count and errors.

It works, but you re-type it for every width and character, and forgetting the length guard throws #VALUE! on any value already at the width.

The 1-click way — Tellsheet

Pad Text pads a whole column to a fixed width with the character and side you choose — zero-pad IDs, right-align labels, or dash-fill codes. Values already at or over the width are left untouched, and the result is text so the padding sticks. Previews first and is revertable. Pairs with Leading Zeros and Add Text.

Frequently asked questions

How do I pad text to a fixed width?

The REPT/LEN formula above, or Tellsheet's Pad Text in one click.

How is this different from Leading Zeros?

Pad Text works on any text, any character, either side — not just zeros on numbers.

Why does Excel drop my zeros?

It reads "000042" as a number. Pad Text stores text, so the padding stays.

Can I pad on the right?

Yes — choose the right side to left-align values within the width.

Related Excel guides

Line up a column to one width

Pad Text fills to a fixed width with any character, left or right — right inside Excel.

Get Tellsheet free See pricing