Easily change your cell content with the Add/Remove Leading Zeros add-in. If leading zeros are missing, make them appear. If they are no longer needed, eliminate them.
Before you start
All values to be processed should be of the same type since the tool adds leading zeros by differentiating between numeric and text values. It either changes the number format or modifies text strings.
Running the tool
To start the tool, click its icon in the Utilities group on the Ablebits Tools tab:
If the Utilities group is minimized and you cannot see the Add/Remove Leading Zeros icon in your ribbon, click Utilities to proceed:
How to add leading zeros
- Select the range of interest:
Pay attention to the icons on the right side of the Select your range box. The first icon is there to help you select your whole table. The second one can be used to get a different range selected.Note. To save your original data, opt for Back up this worksheet. - Decide on the maximum number of characters, including leading zeros, the cells should contain and increase, if necessary, the number you already have to the desired one by changing digits in the Number of characters box in the add-in window:
- Click Apply.
This is the result:
If the maximum number of characters should be kept as is, without any changes, and you only need to add leading zeros to shorter sets, just click Apply:
This is the result:
How to remove leading zeros
- Select the range of interest:
Note. To save your original data, opt for Back up this worksheet. - Decide how many leading zeros you need and decrease the maximum number of characters in the box in the add-in window accordingly:
- Click Apply.
This is the result: