# Google Sheets Search

**URL:** https://community.thunkable.com/t/google-sheets-search/1477829
**Category:** Questions about Thunkable X
**Tags:** google
**Created:** [August 30, 2021, 6:42pm UTC](https://community.thunkable.com/t/google-sheets-search/1477829 "2021-08-30T18:42:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![lavrynenko](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lavrynenko/32/108213_2.png) [@lavrynenko](https://community.thunkable.com/u/lavrynenko)
#### Post date: [August 30, 2021, 6:42pm UTC](https://community.thunkable.com/t/google-sheets-search/1477829/1 "2021-08-30T18:42:03Z")

</div>

Good evening friends!  
Please help: how can you implement GoogleTables search?  
For example, there is a column: ID  
In the application, a person enters the desired ID, and the program looks for the required ID in GoogleTables, after which it displays data from the second column (for example, an email address)?

I’m trying to make a diagram, but something doesn’t work - I can’t figure out where I’m going wrong ☹

 ![Screenshot_1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c5d280a5838bed49f662e233f6d46e0908f5e41e.jpeg)

---

<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: [August 30, 2021, 6:56pm UTC](https://community.thunkable.com/t/google-sheets-search/1477829/2 "2021-08-30T18:56:58Z")

</div>

It sounds like you’re trying to do a VLOOKUP. This video might be helpful:

[![](https://img.youtube.com/vi/9OPLmXSu8l8/maxresdefault.jpg "Thunkable VLookup") ](https://www.youtube.com/watch?v=9OPLmXSu8l8)

But also, your `repeat while` loop has the condition `true` which means it will either never run or will run forever. When you use a `repeat while` block, you need to have a condition that can evaluate to true OR false such as something with an operator (\_\_\_\_ = \_\_\_\_ or \_\_\_\_ \> \_\_\_\_).

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [August 30, 2021, 7:22pm UTC](https://community.thunkable.com/t/google-sheets-search/1477829/3 "2021-08-30T19:22:05Z")

</div>

Try this code.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c5b67718620d2bc375e61e34f5021566b57a883a.png)

This code assumes the text to search for only exist **once**.

---

<div class="post-metadata">

### Author: ![lavrynenko](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lavrynenko/32/108213_2.png) [@lavrynenko](https://community.thunkable.com/u/lavrynenko)
#### Post date: [August 30, 2021, 7:54pm UTC](https://community.thunkable.com/t/google-sheets-search/1477829/4 "2021-08-30T19:54:43Z")

</div>

Phenomenal! Thanks, that’s great!

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [August 30, 2021, 8:01pm UTC](https://community.thunkable.com/t/google-sheets-search/1477829/5 "2021-08-30T20:01:43Z")

</div>

I forgot one thing that will enhance performance for large data tables.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/2/42c9eaf41b97cc89b5f29d206d9fe761d6c7a723.png)  
In the arrow, which is just after displaying the label or doing whatever you want from the loop. You need to `break out of the loop` because you already found what you want and there is no need to continue searching.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/6/260141273af21e9eb3df578f867049207f7f1778.png)

---

<div class="post-metadata">

### Author: ![lavrynenko](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lavrynenko/32/108213_2.png) [@lavrynenko](https://community.thunkable.com/u/lavrynenko)
#### Post date: [August 31, 2021, 4:46pm UTC](https://community.thunkable.com/t/google-sheets-search/1477829/6 "2021-08-31T16:46:52Z")

</div>

Thanks for your support! And for your patience 🙂

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/google-sheets-search/1477829/7 "2024-11-08T13:17:03Z")

</div>


