GSheets: Padding a number with zeros

I often find myself creating spreadsheets that have student register numbers. A unique thirteen-digit number assigned to each student by the institution. Normally, I just copy the entire number as is from a master register bearing the list of all students in my class. This makes sense at the institutional level: there are thousands of students.

But today, I had to draft a sheet for a subset of students, all from the same class: an unofficial draft list of the status of project submissions which would later help in preparing the marklist of the class. So it would suffice to use the last three digits of each student’s number as the first ten establish the class — a confirmed factor in this case.

I entered the register numbers padded with 0s for uniformity.

Simple enough, right?

But spreadsheets don’t want to pad their numbers. So this is what I got instead.

Not quite what I was expecting. Hmm

I found the solution though! There isn’t much to write about, if I didn’t, is there?

  1. Select the range of numbers
  2. Open Format ➜ Number ➜ More Formats ➜ Custom Number Format
  3. Enter 000 in the text field, where the number of 0s matches the desired length of your padded numbers
  4. Click on Apply
  5. Finish the rest of your spreadsheet!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store