# UPC code in Google sheet

**URL:** https://community.glideapps.com/t/upc-code-in-google-sheet/13468
**Category:** Ask for Help
**Created:** [August 2, 2020, 8:44pm UTC](https://community.glideapps.com/t/upc-code-in-google-sheet/13468 "2020-08-02T20:44:46Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 2, 2020, 8:44pm UTC](https://community.glideapps.com/t/upc-code-in-google-sheet/13468/1 "2020-08-02T20:44:46Z")

</div>

Hello Sheet Experts,

I am trying to create a Glide searchable field for UPC code in Sheets. When I use the number or text format, Google removes any preceding zeros ( example: 025293600713 becomes 25293600713) . Can anyone suggest how can I format the cell to avoid this and still remain searchable in Glide.

your help is appreciated

---

<div class="post-metadata">

### Author: ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)
#### Post date: [August 2, 2020, 8:46pm UTC](https://community.glideapps.com/t/upc-code-in-google-sheet/13468/2 "2020-08-02T20:46:12Z")

</div>

It may have to be formatted as text in the Google sheet. Or custom number format to include a leading zero. I know in Excel there’s a setting to allow leading zeros just not sure where it would exist in GSheet.

You can enter them with a ’ in front of the number to easily enter them as text and retain the leading zero.

---

<div class="post-metadata">

### Author: ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)
#### Post date: [August 2, 2020, 8:52pm UTC](https://community.glideapps.com/t/upc-code-in-google-sheet/13468/3 "2020-08-02T20:52:50Z")

</div>

yes this works in google sheets  
😸

---

<div class="post-metadata">

### Author: ![sardamit](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sardamit/32/263_2.png) [@sardamit](https://community.glideapps.com/u/sardamit)
#### Post date: [August 2, 2020, 9:23pm UTC](https://community.glideapps.com/t/upc-code-in-google-sheet/13468/4 "2020-08-02T21:23:05Z")

</div>

Use a helper column to convert numbers into text with leading zeros.

`=text(cell, "0000000")`

---

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 2, 2020, 10:11pm UTC](https://community.glideapps.com/t/upc-code-in-google-sheet/13468/5 "2020-08-02T22:11:05Z")

</div>

Thanks @kyleheney and Amit @sardamit. Both the solutions work and I’ll be using both. @Glider thanks for chiming in and responding. Much appreciated!

---

<div class="post-metadata">

### Author: ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)
#### Post date: [August 2, 2020, 10:59pm UTC](https://community.glideapps.com/t/upc-code-in-google-sheet/13468/6 "2020-08-02T22:59:48Z")

</div>

The old trick since 1995 when I discovered it using Excel is to put an Apostrophe (‘) before the number:

00344 should be ‘00344  
0233 —\> ‘0233  
000003,67 —\> ‘000003,67

With it, Excel and GS will handle the value as a text automatically without any column format set previously.

Saludos @S_C

---

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 2, 2020, 11:42pm UTC](https://community.glideapps.com/t/upc-code-in-google-sheet/13468/7 "2020-08-02T23:42:23Z")

</div>

Thanks @gvalero
