# Is there a way to use code to find the greatest value in a sheet

**URL:** <https://community.thunkable.com/t/is-there-a-way-to-use-code-to-find-the-greatest-value-in-a-sheet/2737249>\
**Category:** Questions about Thunkable X\
**Created:** [December 3, 2023, 11:57pm UTC](https://community.thunkable.com/t/is-there-a-way-to-use-code-to-find-the-greatest-value-in-a-sheet/2737249 "2023-12-03T23:57:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [December 3, 2023, 11:57pm UTC](https://community.thunkable.com/t/is-there-a-way-to-use-code-to-find-the-greatest-value-in-a-sheet/2737249/1 "2023-12-03T23:57:43Z")

</div>

I need to find the greatest value of numbers in a sheet and add 1 to that value when a button is clicked. Please help me out here someone.

---

<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:** [December 4, 2023, 12:04am UTC](https://community.thunkable.com/t/is-there-a-way-to-use-code-to-find-the-greatest-value-in-a-sheet/2737249/2 "2023-12-04T00:04:53Z")

</div>

There are ways to do this in Thunkable but the easiest way is just to either sort the sheet by that column or to create a formula in another cell in the sheet that determines the greatest value and then reference that from within Thunkable.

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [December 4, 2023, 12:09am UTC](https://community.thunkable.com/t/is-there-a-way-to-use-code-to-find-the-greatest-value-in-a-sheet/2737249/3 "2023-12-04T00:09:18Z")

</div>

Could you please show a coded example for this?

---

<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:** [December 4, 2023, 2:46am UTC](https://community.thunkable.com/t/is-there-a-way-to-use-code-to-find-the-greatest-value-in-a-sheet/2737249/4 "2023-12-04T02:46:54Z")

</div>

I don’t have a Google Sheet formula I ca share with you but you can Google it or ask ChatGPT how to do it.

---

<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:** [March 3, 2024, 2:47am UTC](https://community.thunkable.com/t/is-there-a-way-to-use-code-to-find-the-greatest-value-in-a-sheet/2737249/5 "2024-03-03T02:47:27Z")

</div>

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