Excel Forum
Similar Content
Excel Formatting for Zip Codes and Phone Numbers
Tutorial: Display numbers in Excel as zip/postal codes and phone numbers in order to make them easi...
Keep Leading Zeros in Numbers in Excel - 2 Ways
Tutorial: I'll show you 2 ways to add and keep leading zeros in front of numbers in Excel. These t...
Sum Values from Every X Number of Rows in Excel
Tutorial: Add values from every x number of rows in Excel. For instance, add together every other va...

Excel Magic Trick #247: Add Leading Zeroes w Formula

See how to add leading zeros to a text string with an array formula. See the functions IF, LEN, MAX and REPT in one array formula.
The LEN function counts how many characters there are in a text string
The MAX function finds the biggest value amongst a list of values
The REPT function repeats a text string a specified number of times
Array Formulas are entered with the key strokes: Ctrl + Shift + Enter.

Got a Question? Ask it Here in the Forum.