# How to insert a row in the middle of a google sheet

**URL:** <https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964>\
**Category:** Questions about Thunkable X\
**Tags:** help\
**Created:** [October 19, 2023, 4:52am UTC](https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964 "2023-10-19T04:52:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vyopro010r2yd](https://avatars.discourse-cdn.com/v4/letter/v/58f4c7/32.png) [@vyopro010r2yd](https://community.thunkable.com/u/vyopro010r2yd)\
**Post date:** [October 19, 2023, 4:52am UTC](https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964/1 "2023-10-19T04:52:23Z")

</div>

I need my google sheet to be in ascending order so i want it to insert in a way that the highest values are at the top and the lowest at the bottom

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 19, 2023, 5:50am UTC](https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964/2 "2023-10-19T05:50:20Z")

</div>

I believe if you keep your sheet sorted then any row you add will also be automatically sorted

---

<div class="post-metadata">

**Author:** ![vyopro010r2yd](https://avatars.discourse-cdn.com/v4/letter/v/58f4c7/32.png) [@vyopro010r2yd](https://community.thunkable.com/u/vyopro010r2yd)\
**Post date:** [October 21, 2023, 5:55am UTC](https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964/3 "2023-10-21T05:55:38Z")

</div>

That does not work because Everytime I enter a value I have to go to the sheet and click the sort button. Is there a way to make that happen automatically?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 21, 2023, 6:13am UTC](https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964/4 "2023-10-21T06:13:01Z")

</div>

That’s true but you can use the [sort function](https://support.google.com/docs/answer/3093150?hl=en) to sort a copy of the rows automatically.

---

<div class="post-metadata">

**Author:** ![vyopro010r2yd](https://avatars.discourse-cdn.com/v4/letter/v/58f4c7/32.png) [@vyopro010r2yd](https://community.thunkable.com/u/vyopro010r2yd)\
**Post date:** [October 21, 2023, 6:40am UTC](https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964/5 "2023-10-21T06:40:36Z")

</div>

In the end I used this “=SORTN(A2:B, 10000, 0, B2:B, FALSE)” function command but now I want the code to always set a variable to the vale in H1

---

<div class="post-metadata">

**Author:** ![vyopro010r2yd](https://avatars.discourse-cdn.com/v4/letter/v/58f4c7/32.png) [@vyopro010r2yd](https://community.thunkable.com/u/vyopro010r2yd)\
**Post date:** [October 21, 2023, 6:41am UTC](https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964/6 "2023-10-21T06:41:21Z")

</div>

![Screenshot 2023-10-21 at 12.10.51 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/e/ee81beb24aebf1ee28480d0d135497fdc4a2270c.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [January 19, 2024, 6:41am UTC](https://community.thunkable.com/t/how-to-insert-a-row-in-the-middle-of-a-google-sheet/2651964/7 "2024-01-19T06:41:26Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
