Home > database >  How to use a value to search a tab and get a value from the new sheet in googlesheet
How to use a value to search a tab and get a value from the new sheet in googlesheet

Time:11-20

Hello i'm using google sheet as my second databse and in the main page called Companies i have a list of companies as shown below: enter image description here

and i wrote a function that generate a new tab for every companie in the first column. here is what a tab looks like enter image description here

my goal is in the companies tab under "Workers" i want to get the value of "Total workers" of each companie. the list of companies will be constantly growing so i thought about maybe a function that uses the value of the first column to search for the tab and then get the value of G2.

I am really new to google sheet and i would appreciate any help on how to solve this problem

CodePudding user response:

SUGGESTION

You can try this sample script below with custom function named getTotalWorkers & then add it as a enter image description here

Tray tab sheet on cell G2

enter image description here

Pos tab sheet on cell G2

enter image description here

  • Related