# Split first and last name

**URL:** https://community.glideapps.com/t/split-first-and-last-name/66492
**Category:** Ask for Help
**Created:** [September 24, 2023, 10:04pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492 "2023-09-24T22:04:47Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 10:04pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/1 "2023-09-24T22:04:47Z")

</div>

I have a single column for first and last name, and I want to split the text. I was trying to use the comma split text function, so I can pull out the last name only, but it’s not working because there is no comma to use as the separator. I’m doing this because I want to use alphabetization of the last name to sort the data when it is presented to the user on the app.

---

<div class="post-metadata">

### Author: ![Sohaib\_Hakim1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sohaib_hakim1/32/64452_2.png) [@Sohaib\_Hakim1](https://community.glideapps.com/u/Sohaib_Hakim1)
#### Post date: [September 24, 2023, 10:12pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/2 "2023-09-24T22:12:46Z")

</div>

I maybe able to help, so to understand it correctly, what format is the name in? For example:  
John Doe  
Doe John  
John D  
D John

---

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 10:15pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/3 "2023-09-24T22:15:29Z")

</div>

It’s formatted as John Doe, so when I have all the names listed on the app, I want it to alphabetized by the last name.

---

<div class="post-metadata">

### Author: ![Sohaib\_Hakim1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sohaib_hakim1/32/64452_2.png) [@Sohaib\_Hakim1](https://community.glideapps.com/u/Sohaib_Hakim1)
#### Post date: [September 24, 2023, 10:19pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/4 "2023-09-24T22:19:50Z")

</div>

Gotcha! you can use the split text function, erase the comma and use space as the splitter. Then you can use the single value function to pull that last name and store it in its own column which you can use to sort. Here’s a short video showing how to achieve that.  
 ![Extract Last Name](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/b/1b3e3e9d9184230b946b8a84ef579c5b12ba8c89.gif)

---

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 10:28pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/5 "2023-09-24T22:28:34Z")

</div>

Yeah, what you’re doing in your recording is the way I was trying to do it as well, but it’s not working when I do it for some reason. As far as I can tell, I’m doing the exact same thing you’re doing. I screen recorded myself doing it just now, but how do I attach a video clip here? I only see that I can attach a still image file.

---

<div class="post-metadata">

### Author: ![Sohaib\_Hakim1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sohaib_hakim1/32/64452_2.png) [@Sohaib\_Hakim1](https://community.glideapps.com/u/Sohaib_Hakim1)
#### Post date: [September 24, 2023, 10:29pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/6 "2023-09-24T22:29:44Z")

</div>

you can either convert the video to gif and upload the gif here, or you can upload it to google drive and share it via link

---

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 10:31pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/7 "2023-09-24T22:31:09Z")

</div>

[https://drive.google.com/file/d/1x7d9M76dhvIRzkkJUG97YEyh-\_BSQcMO/view?usp=sharing](https://drive.google.com/file/d/1x7d9M76dhvIRzkkJUG97YEyh-_BSQcMO/view?usp=sharing)

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 24, 2023, 10:43pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/9 "2023-09-24T22:43:36Z")

</div>

Can you manually retype one of the names? Don’t use copy and paste. How did the name column get populated in the first place?

---

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 10:46pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/10 "2023-09-24T22:46:06Z")

</div>

Yeah, I tried doing that, but it didn’t work. I think I free typed most of them.[https://drive.google.com/file/d/1hfxTh3\_gOaiVNKhslyq-mZffA6POVyWY/view?usp=sharing](https://drive.google.com/file/d/1hfxTh3_gOaiVNKhslyq-mZffA6POVyWY/view?usp=sharing)

---

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 10:48pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/11 "2023-09-24T22:48:44Z")

</div>

Just to test it out, I jus created a brand new table with a brand new text column where I typed out a name. Then I added a brand new split text column with a space as a the separator, and it didn’t work then either.

---

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 10:50pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/12 "2023-09-24T22:50:20Z")

</div>

[https://drive.google.com/file/d/1Rflq6-WsBr9XH89eEs7Wj0gCRubOiM0r/view?usp=sharing](https://drive.google.com/file/d/1Rflq6-WsBr9XH89eEs7Wj0gCRubOiM0r/view?usp=sharing)

---

<div class="post-metadata">

### Author: ![Sohaib\_Hakim1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sohaib_hakim1/32/64452_2.png) [@Sohaib\_Hakim1](https://community.glideapps.com/u/Sohaib_Hakim1)
#### Post date: [September 24, 2023, 10:50pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/13 "2023-09-24T22:50:35Z")

</div>

That is strange, I would ask you to try a few things. First of, try refreshing the page. Sometimes if the editor is open for a very long time, it causes issues where computed columns don’t work as expected.  
If that doesn’t help, I’m thinking if it’s because the Name column is being used by some other column or action that’s altering the normal text format where it won’t count the space.

- In your split text configuration, try using double space instead of one space and see if that does anything.
- Try duplicating name column using template column and configure split column to target template column instead of the name column.  
 ![Screenshot 2023-09-24 at 5.45.05 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/f/2f6ae502798bb959d8c6f91807db7351ad62e460.png)  
 ![Screenshot 2023-09-24 at 5.45.18 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/8/b89e4d43b70dfef9191fd38eab1e88d126e26155.png)

---

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 10:59pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/14 "2023-09-24T22:59:45Z")

</div>

No go on any of those. I also tried them all on my brand new sheet, and nothing is working.[https://drive.google.com/file/d/1lRg8pYvuTs8ZqmP-v9R6xrlbFTM0OAbB/view?usp=sharing](https://drive.google.com/file/d/1lRg8pYvuTs8ZqmP-v9R6xrlbFTM0OAbB/view?usp=sharing)

---

<div class="post-metadata">

### Author: ![Sohaib\_Hakim1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sohaib_hakim1/32/64452_2.png) [@Sohaib\_Hakim1](https://community.glideapps.com/u/Sohaib_Hakim1)
#### Post date: [September 24, 2023, 11:07pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/15 "2023-09-24T23:07:07Z")

</div>

Okay let’s try a different method by using excel formula function instead of split function.  
Create an excel formula column and use this configuration:  
formula: RIGHT(A1, LEN(A1) - FIND(" ", A1))

 ![Screenshot 2023-09-24 at 6.05.07 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/2/d23cc59afce0af4a89442bf52891e428cff55d23.jpeg)

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 24, 2023, 11:08pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/16 "2023-09-24T23:08:48Z")

</div>

Yeah, it seems to be working for me, so I’m not sure why the Split Text column wouldn’t work.

---

<div class="post-metadata">

### Author: ![meganb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/meganb/32/16632_2.png) [@meganb](https://community.glideapps.com/u/meganb)
#### Post date: [September 24, 2023, 11:13pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/17 "2023-09-24T23:13:29Z")

</div>

> [@Sohaib\_Hakim1](#):
>
> RIGHT(A1, LEN(A1) - FIND(" ", A1))

Aha! The formula worked! Thank you so much for taking the time to help me!

Yeah, the split text was my first thought, but I can’t get it to work for some reason, so strange!

---

<div class="post-metadata">

### Author: ![Sohaib\_Hakim1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sohaib_hakim1/32/64452_2.png) [@Sohaib\_Hakim1](https://community.glideapps.com/u/Sohaib_Hakim1)
#### Post date: [September 24, 2023, 11:16pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/18 "2023-09-24T23:16:40Z")

</div>

Awesome!  
Yes that is very strange as to why the split text did not work. Might be a bug casing it to not read " ". glad I was able to help using a different method!

---

<div class="post-metadata">

### Author: ![SKG](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/skg/32/70047_2.png) [@SKG](https://community.glideapps.com/u/SKG)
#### Post date: [January 27, 2024, 9:25pm UTC](https://community.glideapps.com/t/split-first-and-last-name/66492/19 "2024-01-27T21:25:45Z")

</div>

I was having a similar issue but fixed it by switching over to Google Chrome vs. Safari.
