Sheets formula to generate uniquename based on email?

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.

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

1 Like

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

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.

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?

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.

1 Like