# Remove trailing part of text and adding zeros

**URL:** <https://forum.seatable.com/t/remove-trailing-part-of-text-and-adding-zeros/2111>\
**Category:** Formulas\
**Created:** [February 18, 2023, 4:35pm UTC](https://forum.seatable.com/t/remove-trailing-part-of-text-and-adding-zeros/2111 "2023-02-18T16:35:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pindiplus](https://forum.seatable.com/letter_avatar_proxy/v4/letter/p/41988e/32.png) [@pindiplus](https://forum.seatable.com/u/pindiplus)\
**Post date:** [February 18, 2023, 4:35pm UTC](https://forum.seatable.com/t/remove-trailing-part-of-text-and-adding-zeros/2111/1 "2023-02-18T16:35:06Z")

</div>

Hi

i have a text column in which in import PIN number. Examples SA03.5566 or SA03.234 or SA03.12

I want to convert the PIN into 9 digits without SA03. and add zeros to the left automatically using a formula

Example 000005566  
Example 000000234  
Example 000000012

Can any one create a formula for me please?

 ![Screenshot_20230218-192808](https://forum.seatable.io/uploads/default/original/2X/6/66ca1709aeda346e9dbadfc79bfd5489dda1b44c.png)

---

<div class="post-metadata">

**Author:** ![AkDk7](https://forum.seatable.com/user_avatar/forum.seatable.com/akdk7/32/2186_2.png) [@AkDk7](https://forum.seatable.com/u/AkDk7)\
**Post date:** [February 18, 2023, 7:41pm UTC](https://forum.seatable.com/t/remove-trailing-part-of-text-and-adding-zeros/2111/2 "2023-02-18T19:41:28Z")

</div>

Hi.

Here an example if SA03. will always be the same string.

```auto
left("000000000", 9 - len(substitute({PIN}, 'SA03.', ''))) & substitute({PIN}, 'SA03.', '')

```

![grafik](https://forum.seatable.io/uploads/default/original/2X/0/0e60dcd48f7935b6eb5db9b4990c6d354acb9bec.png)

---

<div class="post-metadata">

**Author:** ![pindiplus](https://forum.seatable.com/letter_avatar_proxy/v4/letter/p/41988e/32.png) [@pindiplus](https://forum.seatable.com/u/pindiplus)\
**Post date:** [February 19, 2023, 3:15am UTC](https://forum.seatable.com/t/remove-trailing-part-of-text-and-adding-zeros/2111/3 "2023-02-19T03:15:45Z")

</div>

Worked like a charm.

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://forum.seatable.com/uploads/default/original/1X/04603423fe81a46c321283663086c475429e8ccb.png) [@system](https://forum.seatable.com/u/system)\
**Post date:** [February 21, 2023, 3:16am UTC](https://forum.seatable.com/t/remove-trailing-part-of-text-and-adding-zeros/2111/4 "2023-02-21T03:16:34Z")

</div>

Closed on February 21, 2023, 3:16am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
