# Sheets formula to generate uniquename based on email?

**URL:** https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078
**Category:** Ask for Help
**Created:** [July 6, 2020, 10:46pm UTC](https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078 "2020-07-06T22:46:27Z")
**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: [July 6, 2020, 10:46pm UTC](https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078/1 "2020-07-06T22:46:27Z")

</div>

I am trying to generate a unique display name for users based on their email address. I have tried splitting the email and joining with a random number to generate a unique display name but random number and, therefore, the display name keeps changing with refresh. Has anyone figured this out?

Any help is appreciated.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 6, 2020, 11:08pm UTC](https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078/2 "2020-07-06T23:08:48Z")

</div>

Can we just get everything before the @, would that make sense?

---

<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: [July 6, 2020, 11:17pm UTC](https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078/3 "2020-07-06T23:17:16Z")

</div>

It may not be unique. Many people may choose same display name different e-mail providers.

---

<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: [July 6, 2020, 11:19pm UTC](https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078/4 "2020-07-06T23:19:38Z")

</div>

Is there any function that pulls last few characters from a cell? I guess I can concatenate email with rowid. Just don’t know that function.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 6, 2020, 11:27pm UTC](https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078/5 "2020-07-06T23:27:00Z")

</div>

That’s the RIGHT function, then you can join it with the rowid.

But that would make it a very long uniquename isn’t it? Why don’t you just use the email as username in that case?

---

<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: [July 6, 2020, 11:30pm UTC](https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078/6 "2020-07-06T23:30:05Z")

</div>

Thanks so much @ThinhDinh. That’s true!  
I used MID function to add just one character and concatenated with email. The user can always edit it.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 24, 2024, 9:46am UTC](https://community.glideapps.com/t/sheets-formula-to-generate-uniquename-based-on-email/12078/7 "2024-09-24T09:46:32Z")

</div>


