Formuladrill

Level 4: Text and dates Exercise 69 of 118

IDs with leading zeros

An Excel formula exercise from Formuladrill. Solve it with a formula bar on a live sheet in your browser, and it is checked the moment you submit.

The task

The billing system needs every customer ID as text with exactly five digits, padded with zeros in front: 42 becomes 00042. Fill B2 and B3.

What this exercise teaches

A number cannot keep leading zeros, so the padded ID has to be text. TEXT with a format of zeros does it; =RIGHT("00000"&A2,5) is the version without TEXT.

A hint if you get stuck

TEXT(A2,"00000") shows the number with at least five digits. Each 0 in the format is a digit that is always shown.

Functions used: TEXT

Try it now, free, no account needed

Your first 15 exercises on Formuladrill are free. Open it on the practice page, solve it, and get instant feedback with a hint. A free account adds the worked solution; Pro unlocks every exercise, timed mode and the certificate.

Open this exercise

More exercises in Text and dates