# How to make a numbered leaderboard

**URL:** <https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088>\
**Category:** Ask for Help\
**Created:** [November 29, 2020, 1:42am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088 "2020-11-29T01:42:45Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![sliu57](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sliu57/32/16172_2.png) [@sliu57](https://community.glideapps.com/u/sliu57)\
**Post date:** [November 29, 2020, 1:42am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/1 "2020-11-29T01:42:45Z")

</div>

Hi,  
I’ve watched Robert Petitto’s video on making leaderboards.

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/7/7cec592f4b1f528fc0980f25af91da8718f87322.jpeg "Gamify your Glide App #4: Badges and Leaderboards") ](https://www.youtube.com/watch?v=vl_IcRNVreM&t=1889s)

However, I’m not sure how to have the leaderboard numbered, where it shows who is 1st, 2nd, 3rd, etc.

I currently have what he has made, but I would like to add a numbered list essentially.

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 29, 2020, 1:55am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/2 "2020-11-29T01:55:29Z")

</div>

The images represent the number, he probably made a column that listed the scores or rankings and simply sorted the list from lowest to highest or vice versa if it is a score.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/7/e7df0f9227808cf4be44b045c665c08b59ad09b2.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/8/58284400e53cff2d909a40d00e0c790071d104e2.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/4/247af7a06b0ebdeb1bcdf0c3d8f02e6cac07fb85.png)

INLINE LAYOUT

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/9/89e4ac7ff579b980321a78eef153fbdc2df8b60e.png)

---

<div class="post-metadata">

**Author:** ![sliu57](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sliu57/32/16172_2.png) [@sliu57](https://community.glideapps.com/u/sliu57)\
**Post date:** [November 29, 2020, 2:13am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/3 "2020-11-29T02:13:01Z")

</div>

Thanks for your help. However, my goal is to make the “Static Ranked Numbers” Column that you made using a formula.  
How did you make that column?

Since the sheet that I’m using is always being updated, the rankings may change as well depending on user scores.

---

<div class="post-metadata">

**Author:** ![sliu57](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sliu57/32/16172_2.png) [@sliu57](https://community.glideapps.com/u/sliu57)\
**Post date:** [November 29, 2020, 2:14am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/4 "2020-11-29T02:14:35Z")

</div>

I don’t really need to sort the scores themselves in google sheets, since I can use glide to sort the score column for the user to see.

---

<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:** [November 29, 2020, 2:25am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/5 "2020-11-29T02:25:12Z")

</div>

> **[RANK - Docs Editors Help](https://support.google.com/docs/answer/3094098?hl=en)**

Try this maybe.

---

<div class="post-metadata">

**Author:** ![sliu57](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sliu57/32/16172_2.png) [@sliu57](https://community.glideapps.com/u/sliu57)\
**Post date:** [November 29, 2020, 2:39am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/6 "2020-11-29T02:39:13Z")

</div>

Yes, this is what I was looking for. Thank you.  
However, I’m trying to use the rank function on a sheet that will always be able to add or remove users, so I’m not sure how to edit the formula to do this.

So essentially, there can be 15 rows in the future and I want the ranking column to be able to account for that.

 ![Screenshot_2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/1/d10ddbd57ed1489f8f2ca8da369be0e50250bd75.png)

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 29, 2020, 2:43am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/7 "2020-11-29T02:43:19Z")

</div>

Use an array formula and make sure in the formula it leaves a blank cell if there isnt a user for that row  
=Arrayformula(IF(A2:A="","",SORT(B2:B))

Something like that. So when u add a row glide recognizes the row as empty then the array formula adds the values as needed.  
You can also just have another sheet that pulls the data and matches and sorts so you dont have to worry about that.

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 29, 2020, 2:46am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/8 "2020-11-29T02:46:18Z")

</div>

I didn’t know Robert did tutorials as well. I might check them out sometime.

---

<div class="post-metadata">

**Author:** ![sliu57](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sliu57/32/16172_2.png) [@sliu57](https://community.glideapps.com/u/sliu57)\
**Post date:** [November 29, 2020, 2:47am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/9 "2020-11-29T02:47:08Z")

</div>

They are really helpful 🙂

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 29, 2020, 2:48am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/10 "2020-11-29T02:48:46Z")

</div>

Well, him and I started Glide around the same time and it feels like we both know everything there is to know about Glide, he posts more frequently than I do unless I’m on vacation or something. But not to sound like an ass I haven’t come across something I’ve needed help on just yet.

---

<div class="post-metadata">

**Author:** ![sliu57](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sliu57/32/16172_2.png) [@sliu57](https://community.glideapps.com/u/sliu57)\
**Post date:** [November 29, 2020, 3:06am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/11 "2020-11-29T03:06:54Z")

</div>

I’m not sure how to do this with the rank function. Also, I have made it so there is no row that is empty.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [November 29, 2020, 3:09am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/12 "2020-11-29T03:09:06Z")

</div>

Hey there … using a Rank formula is the way to go…you’ll just need to dynamically set the max number of rows by doing a count.

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 29, 2020, 3:09am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/13 "2020-11-29T03:09:15Z")

</div>

rank function? You just put the cell you are ranking 1st, then the range it is tested against, then ascending or descending  
RANK(4,A2:A100,1)  
if you use 0 the largest value is ranked 1st if you use 1 then the smallest value is ranked 1st.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/0/80ac2f7aaf8dfd1be273c8c6f6e93facde619c25.png)

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 29, 2020, 3:11am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/14 "2020-11-29T03:11:57Z")

</div>

Then just have your images lookup rank number and retrieve corresponding image.

---

<div class="post-metadata">

**Author:** ![sliu57](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sliu57/32/16172_2.png) [@sliu57](https://community.glideapps.com/u/sliu57)\
**Post date:** [November 29, 2020, 3:22am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/15 "2020-11-29T03:22:55Z")

</div>

The problem I am facing is that the ranking column is based on a dynamic column that is always changing. Having C2:C6 would only work for C2:C6, but if new users were added, then it would then be C2:C20.

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 29, 2020, 3:33am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/16 "2020-11-29T03:33:50Z")

</div>

then use c2:c  
it does everything from c2 and down

You see how I use that same idea in the arrayformula above. Never limit yourself to a set range, it gets you in trouble in the end.  
So instead,  
=ARRAYFORMULA(RANK(C2:C,C2:C,0))

Then to remove errors use  
=ARRAYFORMULA(IF(ISERROR(RANK(C2:C,C2:C,0)),"",RANK(C2:C,C2:C,0)))

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 29, 2020, 3:42am UTC](https://community.glideapps.com/t/how-to-make-a-numbered-leaderboard/19088/17 "2020-11-29T03:42:59Z")

</div>

put this formula at the top of your list that ranks and your done.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/b/fb2f7f1d4fd50c755c9550849458abebf9a67ce6.png)

```
 =ARRAYFORMULA(IF(ISERROR(RANK(C2:C,C2:C,0)),"",RANK(C2:C,C2:C,0)))

```

keep in mind in my example im sorting my data from smallest to largest, otherwise it would show a more random set like this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/8/e80cc2ac997ca968b5f2f950414e01b63312caf9.png)
