# Create an Index to sort A-Z

**URL:** https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191
**Category:** Ask for Help
**Created:** [January 15, 2021, 3:17am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191 "2021-01-15T03:17:01Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![kabookie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kabookie/32/10994_2.png) [@kabookie](https://community.glideapps.com/u/kabookie)
#### Post date: [January 15, 2021, 3:17am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/1 "2021-01-15T03:17:01Z")

</div>

Today’s challenge was to create a scrollable index for a list of companies that groups them by the first letter of the company name. It took a bit of figuring out, but I am very happy with the result and want to share so it can help someone else. I had searched but was not able to find the answer in the forum.

So here is a quick loom:

And here the formula that made it work:  
={“Index”; ARRAYFORMULA(IFNA(REGEXEXTRACT(A2:A, “.”)))}

And thank you @Robert_Petitto for this video which helped greatly: [https://youtu.be/3C0B7nHLcCA](https://youtu.be/3C0B7nHLcCA)

 ![California_Design_District_·Glide·_Create_Apps_from_Google_Sheets](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/c/3ccdf5579deb3855fe5609c4cb0d1de12d85f78a.png)

---

<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: [January 15, 2021, 3:23am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/2 "2021-01-15T03:23:52Z")

</div>

Lovely idea.

---

<div class="post-metadata">

### Author: ![Nadir\_Abdelrahman\_MD](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nadir_abdelrahman_md/32/5237_2.png) [@Nadir\_Abdelrahman\_MD](https://community.glideapps.com/u/Nadir_Abdelrahman_MD)
#### Post date: [January 15, 2021, 3:29am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/3 "2021-01-15T03:29:17Z")

</div>

Thanks for sharing.

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [January 15, 2021, 3:31am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/4 "2021-01-15T03:31:14Z")

</div>

Excellent! Thank you for taking the time to make this tutorial.

---

<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: [January 15, 2021, 6:13am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/5 "2021-01-15T06:13:01Z")

</div>

Nice job!

Just a comment on your choice of function for the arrayformula. Whilst `REGEXEXTRACT()` obviously does the job, it’s probably a bit of overkill for this use case. There are lots of ways you can extract the first character from a string, but probably the simplest would be by using `LEFT()`

Note that while `LEFT()` accepts a parameter indicating how many characters to extract, it is optional and defaults to 1. Which it makes it perfect for your use case 🙂

So your arrayformula could be:

`={"Index"; ARRAYFORMULA(IFNA(LEFT(A2:A)))}`

---

<div class="post-metadata">

### Author: ![kabookie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kabookie/32/10994_2.png) [@kabookie](https://community.glideapps.com/u/kabookie)
#### Post date: [January 15, 2021, 6:14am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/6 "2021-01-15T06:14:39Z")

</div>

@Darren_Murphy thank you! I did not run across that option in my research.

---

<div class="post-metadata">

### Author: ![Brad\_Legassick](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/brad_legassick/32/8289_2.png) [@Brad\_Legassick](https://community.glideapps.com/u/Brad_Legassick)
#### Post date: [January 15, 2021, 6:53am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/7 "2021-01-15T06:53:40Z")

</div>

@kabookie thx for the tip, Glide encourages out the box problem solving! 🙂

---

<div class="post-metadata">

### Author: ![wjcv06](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wjcv06/32/12747_2.png) [@wjcv06](https://community.glideapps.com/u/wjcv06)
#### Post date: [January 15, 2021, 6:58am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/8 "2021-01-15T06:58:04Z")

</div>

LEFT, RIGHT, SUBSTRING should be part of the math column 😕

---

<div class="post-metadata">

### Author: ![Jacktools\_Net](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jacktools_net/32/18500_2.png) [@Jacktools\_Net](https://community.glideapps.com/u/Jacktools_Net)
#### Post date: [January 15, 2021, 8:23am UTC](https://community.glideapps.com/t/create-an-index-to-sort-a-z/21191/9 "2021-01-15T08:23:45Z")

</div>

Array.size  
Array[index] to get a specific value fron an array column.
