There are a number of methods on how to add leading zeros in Google Sheets. We will explore these methods through step by step tutorials below.
Before typing your number, add an apostrophe ('). For example, enter '001234 for Employee IDs. Google Sheets treats the entry as text and keeps the leading zeros. Check that each cell correctly shows the leading zeros. The apostrophe will not be visible in the cell once you press enter, only in the formula bar.
Follow the steps below to format cells as text.
Click on the cell or drag over the range where you’ll enter data. Select all cells where you plan to input numbers with leading zeros.
Go to the "Format" menu, navigate to "Number", and then select "Plain text". This action sets the cell format to text.
Now, type your numbers into these cells. Because they are formatted as text, Google Sheets will keep the leading zeros.
Follow the steps below to preserve leading zeros using custom formats.
Highlight the cells where you want to keep leading zeros. This method is useful for numerical data where format consistency is important.
With the cells selected, click on "Format", choose "Number", then "Custom number format".
In the custom format field, enter the format with leading zeros. For example, use 000000 for six-digit Employee IDs, 000000 for six-digit Product Codes, and 00000 for five-digit ZIP Codes. Click "Apply".
Ensure your data appears correctly with leading zeros. Custom formats allow numerical values to retain leading zeros and stay in a consistent format.
We hope that you now have a better understanding of how to keep leading zeros in Google Sheets. If you enjoyed this article, you might also like our article on how to add emojis to Google Sheets or our article on how to crop an image in Google Sheets.