# Complex google sheet reading

**URL:** <https://community.thunkable.com/t/complex-google-sheet-reading/1577434>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [October 23, 2021, 5:20pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434 "2021-10-23T17:20:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 23, 2021, 5:20pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/1 "2021-10-23T17:20:26Z")

</div>

## Hey guys ! I am trying to create app for my racing league . I want the user to get information specific to that race by pressing the races I made with the data grid list.

My purpose:I want the user to access specific but same data for each weekend .

I want 3 information to be displayed for each race. these are race position , race points and rating . but all data will differ according to each race as in google sheet.

My data grid

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/9/79b4cb3bbc5b82392efe3e2b8f9382e88050b27a.png)  
my google sheet  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/9/19227d7c9543d7d351a263c848ee0caf8aa2ba7f.png)

can my program be done ? and can you guide me .  
thanks

---

<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 23, 2021, 5:24pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/2 "2021-10-23T17:24:49Z")

</div>

Yes, Thunkable has a Data Viewer Grid component that will work well for this. You can search the forums or Google _Data Viewer Grid Thunkable_ to get started with the documentation and video tutorials. If you have questions, just post a screenshot of your blocks and explain what is/is not working.

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 23, 2021, 5:33pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/3 "2021-10-23T17:33:20Z")

</div>

@tatiang i ve watched tons of videos , and people are doing with rowID to display 1 image or 1 text. But i have 20 races and all of them has different info and i want to show 3 columns per race . My question is whats the easiest way to do it actually . I know this can be madeable but as a beginner i just need guidance.

---

<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 23, 2021, 5:52pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/4 "2021-10-23T17:52:35Z")

</div>

It sounds like you need to display position, points and rating for each race.

I would sync a Data Viewer Grid (DVG) to your Google Sheet but you need to arrange your sheet differently. You need to have one race per row, like this:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/6866e9daac0cabc85c98d95f983e21759fb36a98.png)

Then when you sync to the DVG, you can select the 3 data values and display them all at once. It’s possible you may need to make a [custom DVG](https://docs.thunkable.com/custom-data-viewer-layout) that has that many fields (labels).

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 23, 2021, 6:03pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/5 "2021-10-23T18:03:50Z")

</div>

your solution looks very promising , i ll update in 30 min time .

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 23, 2021, 6:50pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/6 "2021-10-23T18:50:21Z")

</div>

the thing is i am trying to get data for 20 drivers .  
i tried this but nothing happened  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/f/cf674fa3af8217c1d47876eb85ee5be1e7b31bd6.png)

---

<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 23, 2021, 6:52pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/7 "2021-10-23T18:52:49Z")

</div>

I don’t understand how you have that set up and how the data connects to each other in your sheet. It’s possible you need a second Google sheet to hold driver info.

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 23, 2021, 7:10pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/8 "2021-10-23T19:10:05Z")

</div>

normally data comes from another excel and that excel connected to a system that gets data from the game

EDIT : to be clear Drivers and teams will never change. What I want to do is, with the help of the data viewer grid, the user will click on the race that he wants to see the details of the race. I want to show the Race Point, Race Position and Drl Rating, which change for each race, specific to the race.

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 23, 2021, 8:07pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/9 "2021-10-23T20:07:19Z")

</div>

will this work for you?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/086a9ca46e2885b0a50a4c472114d126fd86b499.png)

you use the race lookup using race to get the race\_index  
use race\_index + 2 to get the column in the stats table, use driver and team for row.

split the cell found at (row, column) by delimeter “^” into position, points, rating

in terms of record id, make an artificial key concatenating driver and team when you load your table. that way the keys map to record id (ie. keys(3) will point to record\_id (3)). create 2 lists of keys and record\_id’s which are parallel. given a driver,team combo, you can obtain the record\_id that corresponds to it and from theere obtain the rest of the record from the worksheet

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 23, 2021, 8:30pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/10 "2021-10-23T20:30:18Z")

</div>

i dont have that kind of knowledge yet but i ll try to do that sir thx for detailed answer

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 23, 2021, 11:18pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/11 "2021-10-23T23:18:19Z")

</div>

hey @manyone ,  
just to be clear , pilots and names are constant . i skipped that part  
i call race1 column with race\_index+2 ( i assume race\_index=0) than  
with the help of delimeter i send the data to google sheets to make new 3 columns for each information.  
then i read them back .Did i understand correctly ?  
and  
1-if its true is there a way to read column or can i use data viewer list .

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 23, 2021, 11:48pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/12 "2021-10-23T23:48:46Z")

</div>

am i right in my assumptions? assuming my example is your entire data.

1. when you press italy button from a list (4 items) of races, you want to see a list of the 10 players, their team and the values in column D (ie. race2)?  
2, when you press spain button, you want to see the same but instead of column d you should see column f?
2. where do those original values come from? are there 4 separate tables somewhere (one tab? per race) that carries the same info as above? my proposal was just to have google sheet automatically populate the table above with formulas that refer to the other 4 tables (presumably as 4 additional tabs) whenever those 4 tables are refreshed?

if this is true - you are just redisplaying static data, then your objective is to create a data viewer list depending on the race selected.  
your challenge is to come up with one sheet that updates dynamically whenever new values for the sources arrive. it is mostly a google sheet challenge.  
(or maybe i have the wrong assumption all along?)

---

<div class="post-metadata">

**Author:** ![unsalberkay1905cfbe](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@unsalberkay1905cfbe](https://community.thunkable.com/u/unsalberkay1905cfbe)\
**Post date:** [October 24, 2021, 6:51am UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/13 "2021-10-24T06:51:56Z")

</div>

first assumption correct @manyone

for the second part , we have a propgram and that program connected to the f12021 game and it gets race results and more stuff like this. and program creates new excel and that excel got formulation to fill 8 different excel tabs . but my task is to show the the last part of the chain to mobile.  
EDIT: system updates infos because its connected to the game  
EDIT 2 ; i told you that I want to show raceposition, racepoints and drl rating above. the reason I’m saying this is because if I can show raceposition, racepoints, and drl rating, I can show the others.(trying to clear question marks)

My task is to show qualification results , race position results and the penalty results

for example this is the penalty sheet

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/6/c65b02f860077d501c37fcfec2284d4139aa9c48.png)  
this is the qualifaction sheet  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/c/2cc6e32eed062e9a0dd4c04ae9e94d2dd507bbb3.png)

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 24, 2021, 4:29pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/14 "2021-10-24T16:29:59Z")

</div>

are these two tables the result of your program that generates all the excel tabs? then it’s a different approach you need (i’m still assuming your mobile app will take a race as input and will display the race stats for that race, for all drivers, in a scrollable data viewer list).

you need a new tab that will contain the selected race name, AND the equivalent race\_number (say Bahrain = 1, Italy = 2. etc). this number will be used in the next tab below. the race\_number can be obtained by vlookup.

then you need a RESULT tab which has all the players (and teams) and the following columns (QUAL\_pos, QUAL\_rating, PEN\_pen1 and PEN\_pen2, for example)

if race\_num=1,  
QUAL\_pos - will come from column 3 of QUAL  
QUAL\_rating - will come from column 4 of QUAL  
PEN\_pen1 - will come from column 3 of PENALTY  
PEN\_pen2 - will come from column 5 of PENALTY  
etc.  
if race-num=2 ,  
QUAL\_pos - will come from column 5 of QUAL ,5=((race\_num-1)\*2+3)  
QUAL\_rating - will come from column 6 of QUAL ,6=((race\_num-1)\*2+4)  
PEN\_pen1 - will come from column 9 of PENALTY ,9= ((race\_num-1)\*6+3)  
PEN\_pen2 - will come from column 11 of PENALTY ,11= ((race\_num-1)\*6+5)

you can do all this using the INDEX function of excel.

the RESULT tab is ready to be loaded to your data viewer (it will have to be CUSTOMised to accomodate all your extra columns)

i hope this helps

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 24, 2021, 6:44pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/15 "2021-10-24T18:44:23Z")

</div>

thanks a lot will try that

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 25, 2021, 11:49am UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/16 "2021-10-25T11:49:55Z")

</div>

hey @manyone sry for bothering again

i manage to copy with vlookup but Is this what you wanted me to do?

thanks again ( i made it at the same tab will that be a problem)

edit ; i manage to copy from another tab  
my first tab for races

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed8a38615565c531e16fbd7d677f1300a5d22932.png)

my result tab ( i write specific vlookup for every race is there a easy way to do it example :=VLOOKUP(A2;race\_number!$A2:$B4;2) for bahrain=1  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/c/4cbe168c3af41625338c8b3adb7bfebb7835e2d6.png)

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 25, 2021, 4:13pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/17 "2021-10-25T16:13:45Z")

</div>

this is what the tab SEL will look like:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/4/b4f296ebe0458aa9830f0cbfccaa7f3ea7742d1e.png)

the idea is , your app will ask user for race name via drop down list then it should update cell A2 of this tab and cell B2 will compute automatically. you need this cell to be present in the spreadsheet so the tab RESULT can use it in the computation.

BTW, can you confirm that you already have QUAL and PENALTY tabs available? ie. are those inputs?

for the RESULT tab, i suggest you google the JOIN function in excel.

here’s an example of INDEX function.

assuming this is your **SEL** tab,  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/4/040441eeb63b22f573c37e601c5ae3d7ac750550.png)

assuming this is your **QUAL** tab (actual name is Sheet6),  
 ![QUAL_tab](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/6/764844a4b2639ac8c06b19a5698c424a4b323e86.jpeg)

this is what **RESULT** tab would look like (note the formula for cell B2):  
 ![RESULT tab](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/5/656499777488742095aec99246bb1325c74fe211.jpeg)

it’s the above tab that loads into the thunkable data viewer list.

---

<div class="post-metadata">

**Author:** ![unsalberkay1905cfbe](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@unsalberkay1905cfbe](https://community.thunkable.com/u/unsalberkay1905cfbe)\
**Post date:** [October 25, 2021, 7:29pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/18 "2021-10-25T19:29:12Z")

</div>

isnt there s a way to write race name when user clicked the race button on grid list?  
yes i can confirm that QUAL and Penaly input

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 25, 2021, 9:25pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/19 "2021-10-25T21:25:53Z")

</div>

of course there is, if button is picked you’d have several of these:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/8/588a8ad72e18ce3209041f7ba3bfb95dd66ab4cb.png)

or it could be from a drop down, then it’s another block  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/7/e77d83949356550360569e8eac5f11d1e27c111b.png)

this will update the race column for the sel tab with value selected. no typing,

---

<div class="post-metadata">

**Author:** ![denemeyanilma892420](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@denemeyanilma892420](https://community.thunkable.com/u/denemeyanilma892420)\
**Post date:** [October 25, 2021, 9:31pm UTC](https://community.thunkable.com/t/complex-google-sheet-reading/1577434/20 "2021-10-25T21:31:33Z")

</div>

sir thanks for that ,but i think we re not using the same UI

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/4878ede008f0492c1ffa4ea499aa426311085e26.png)  
mine is not like yours and do u want me to initalise sel\_row\_id

[Next page](https://community.thunkable.com/t/complex-google-sheet-reading/1577434.md?page=2)
