Google sheets dynamic query to import multiple tabs? - google-sheets

I'm trying to import data from multiple tabs into a new sheet in Google sheets. The column headers are the same for each tab, and the data is normalized across all of them. I can use the importrange function without a problem, but here's the issue: Every day, a new tab is created, and I don't want to have to edit the query to include a new tab each day.
Is there a way to write an import range function (or similar query) so that it will import EVERY tab in a specified sheet? e.g. Today, Sheet1 has Tab1, Tab2, Tab3; tomorrow, Sheet1 has Tab1, Tab2, Tab3, Tab4; the next day, Tab1, Tab2, Tab3, Tab4, Tab5.

not possible without scripts. one way would be to generate a formula with a formula. from there you have two options:
use script to auto-insert formula into the chosen cell on any edit
copypaste it manually where you need it
there is also the possibility to pre-program non-existent sheet names, so after they are created they will be "activated"
and lastly, go full scripting

Related

Importrange Query Google Sheet Include SheetName

I'm using Query and Importrange to pull details from other tabs on a Google Sheet.
The other tabs are linked to individual Google Forms.
I'd like to include the name of the sheet the data came from in the query but can't figure out a way to do this.
Any ideas?
I did try having a column on each sheet that contained the name of the sheet i.e. a column on sheet1 where all the entries are sheet1. Then with the query have that column included in the selection.
However, when new Google Forms submissions are made, a new row is added (I think) and the column that contains the sheet name now has a empty entry where the new row was added.
I'm not able to share the sheet as it contains student info from school and it's not-shareable outside my organisation.
Most likely you are using a drag-down style formula within the form responses tab which would cause this rows not aligning with your already included formula as & when new responses pop in!
You could just use an arrayformula accommodated in the first row_cell itself as shown in the screenshot and it should fix this thing. Please do test it out and let us know if its solved or aint.
=INDEX(IF(LEN(A:A),"SHEET 1",))

Using IMPORTRANGE to grab data from a sheet with a dynamic cell reference

In Google sheets, I'm trying to have a sheet that uses IMPORTRANGE to bring data from another sheet (a master). But I want the sheet name to be dynamic so I can reuse this sheet that I'm making depending on the list of names in the master.
The master sheet has a tab with all the names, which is where I'm trying to grab cell reference from. Using that reference, look in the tab with that name and grab the data from my given range.
What I'm trying is:
=importrange("1hwHYdFXwAFtBlvIVSYVsLi6x7XtGXlXcynIyaFgTbD0", ""&Class!A25&"!C1:BI")
It seems to be trying to grab from the class tab in the sheet I'm using the IMPORTRANGE formula in instead of the class tab of the sheet I want the data from.
You can do it by this way
=importrange("__yourID__";importrange("__yourID__";"Class!A25") & "!C1:BI")

I need to compare values between two sheets to find matching items

I need to compare two different sheets to find matching values between them.
In the first sheet, I have a list of order numbers and in the second one, I have a list that needs dispatching. Therefore, without scrolling through the sheet manually for the 1000+, I'd like to use a formula or conditional formatting in order to flag the values that are the same (or all of the different values) so I can simply copy and paste this into another sheet.
I have shared a link to a google sheet below if someone could help with this that would be very much appreciated.
Edit: The second sheet (on the google document) is the list of all orders and the first are the ones to be dispatched. I need to know which one's from the second sheet are missing from the first.
https://docs.google.com/spreadsheets/d/18vSBu9GzxK1UMCE2RrDyNSH6yi-FzTvuABsVw9r172Y/edit?usp=sharing
In second sheet in column B you could do:
=COUNTIF(Sheet1!A:A,A2)
IF the formula returns 0, it means that id number is not in your first sheet.

How do I dinamically import the content of this Google sheet into a new sheet?

I would like to import the content of the following sheet https://docs.google.com/spreadsheets/d/1O39L_z1lJUyW-AXCYyVH_MZ9eGWMbQ4_kHNDPW862iw/edit?usp=sharing into an empty sheet. This needs to be done in a way that if new data gets added in the parent sheet, it is automatically copied in the new one. I shpuld also have the option to modify a formula in the "new" sheet only.
If you want to import to a different spreadsheet, use IMPORTRANGE, as mentioned by Oleg_S:
=IMPORTRANGE("YOUR_SPREADSHEET_ID", "Calendar!A:X")
If you want to import to another sheet in the same spreadsheet, you have other options at your disposal:
ARRAYFORMULA:
=ARRAYFORMULA(Calendar!A:X)
QUERY:
=QUERY(Calendar!A:X)
Note:
Please notice that, if you want the target sheet to get automatically updated when the source data is modified, you will not be able to modify the data in the target sheet directly.

Using text from a cell in a formula in Google Sheets

I would like to use the text from a cell in a formula in Google Sheets.
I have a document with multiple sheets that a variety of people can edit with a H,M,L (high, medium, low) value from a drop-down list. Each person has their own tab in the Google Sheet.
I then have a dashboard that populates based on their choices of H,M,L. I know that I can use the formula =('Jay Delacruz'!C6) for example to populate a cell in another sheet by manually selecting the cells on the other sheet.
However, I am looking to make quite a few of these documents automatically with another Google Script that I am running that creates the individual sheets from a roster of names on the first tab.
My question is, is it possible to have a =('Jay Delacruz'!C6) type formula that instead of the sheet reference it can pull the name of the person from the roster, as this will match exactly the sheets that are automatically generated by the script I have running.
So I would essentially have a pre-populated dashboard of formulae that would become valid once the sheets are created with the names, as created by the other script.
If it makes it a little clearer, there is a link below to make a copy of the Sheet I am working with. All names were randomly generated, so don't reference any real people or data.
https://docs.google.com/spreadsheets/d/1NiXqko8SibD6VsfrnFcj7e7c99Hg-RoSlHVAYWb0E94/copy
Thank you in advance!
Liam
Try
=INDIRECT(C1&"!C6")
Also see here for more info on INDIRECT() function.

Resources