Using text from a cell in a formula in Google Sheets - 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.

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",))

Google Sheets - Grab data from a separate sheet and add it to a master sheet

I have a Google Sheet that has a main master sheet, with a column for users to fill in their Name to show they are "working" on that row, then that row gets populated to their own tab based on a =QUERY(Master!A3:AA,"select * Where L='Name'") for each of the users' tabs, there is 8 total tabs where users are updating information. This is already quite a bit of processing on Googles part, so I am trying to generate a separate Google Sheet that pulls in the information that the users are entering on each of their tabs so the management can monitor that sheet for updates and then both sheets will run a lot faster/smoother.
I have tried using a VLookup with this syntax: =vlookup(A3,importrange("sheetID",{"Name1!$A$3:$N";"Name2!$A$3:$N";"Name3!$A$3:$N";"Name4!$A$3:$N";"Name5!$A$3:$N";"Name6!$A$3:$N";"Name7!$A$3:$N";"Name8!$A$3:$N"}),12,FALSE) which gives me an #N/A Error, cannot find Value '1' in VLOOKUP evaluation.
I have also tried using a =QUERY({importrange("sheetID"x8 with the ranges)}, "Select Col12,Col13,Col14 where Col2 matches '^.\*($" &B3 & ").\*$'")
That only returns headers, I am trying to get the query to basically find the unique key in Column A then spit out what is in Col 12-14, but that doesn't seem to work either. Columns 1-11 are static, but Columns 12-14 are what I am trying to populate for the management, which is the work that the staff is inputting on each of their tabs.
I can get the query working if I keep it on the same worksheet as the one the staff is working on, but then it bogs down the whole sheet so I would like to keep it separate if possible. Any ideas? I can't provide a sample sheet at this time since it has financial info on it, but I can add more details if I know what to look for.
your formula should be:
=VLOOKUP(A3, {
IMPORTRANGE("sheetID1", "Name1!A3:N");
IMPORTRANGE("sheetID2", "Name2!A3:N");
IMPORTRANGE("sheetID3", "Name3!A3:N");
IMPORTRANGE("sheetID4", "Name4!A3:N");
IMPORTRANGE("sheetID5", "Name5!A3:N");
IMPORTRANGE("sheetID6", "Name6!A3:N");
IMPORTRANGE("sheetID7", "Name7!A3:N");
IMPORTRANGE("sheetID8", "Name8!A3:N")}, 12, 0)
keep in mind that every importrange needs to be run as a standalone formula where you connect your sheets by allowing access. only then you can use the above formula

Can I make Google Sheets evaluate a string input as if it were a formula?

I am creating a home budget for myself in Google Sheets, working in Chrome on Windows 10. In the end, the budget will be composed of separate sheets for each month, containing tables for each Friday (payday) within that month. All such tables will follow a certain format and will pull arrays of budget data from an auxiliary sheet.
However, trial-and-error (mostly error) is abundant, and one quails at the thought of having to paste corrections across 52 tables. Is there any way to have each table emulate a formula set down in a template? For example, ideally, my template would contain something like:
=INDEX(IF(condition(relativeCell),namedRange1,namedRange2)
and the final product would pull that formula (with relative reference) to each table. If I discover a mistake or need to make a change, I can simply change the template, and all of the live tables would update their formulas.
Can this be done in Google Sheets?
Failing that, I already have a function that returns a cell's formula as string text. Can this be used to get the desired effect?
there is a formula called INDIRECT which does exactly that:
https://support.google.com/docs/answer/3093377?hl=en

How can I copy a formula in a automatic way in google sheets

I have a main sheet in witch I copy it and create different versions, kind of like simulating different results.
But every time I want to change something in the main sheet, I have to go in all the other sheets I created and changed.
I don't know if it is possible, but the best way for me would be to create a formula like this:
copyFormula(Sheet1!V2) -> And bringed the exactly same result as if I had gone to Sheet1 copied V2 and pasted it this cell.
I tried to create this formula but failed consistently.
Thanks!!
What you need to do is to manipulate the properties of the sheets.
Here is a reference where you can create those actions.
The Sheets API allows you to create sheets, delete sheets, and control
their properties. The examples on this page illustrate how some common
sheet operations can be achieved with the API.
In these examples, the placeholders spreadsheetId and sheetId are
used to indicate where you would provide those IDs. The spreadsheet
ID can be discovered from the spreadsheet URL; the sheet ID can be
obtained from the spreadsheet.get method.
You can refer to this documentation on how you can read the formula you are needing in the entire sheets.
The Sheets API allows you to read values from cells, ranges, sets of
ranges and entire sheets. The examples on this page illustrate how
some common read operations can be achieved with the
spreadsheets.values collection of this API. You can also read
cell values using the spreadsheets.get method, but in most cases
using spreadsheets.values.get or
spreadsheets.values.batchGet is easier to use.

Is there a way to list all sheets on a google spreadsheet using native functions?

I create many dashboards on Google Spreadsheet, which are basically a spreadsheet containing a bunch of sheets with all sort of different data. Some of these spreadsheets can have up to 30 sheets or more.
I want a way to list the name of all sheets in a spreadsheet on a column using native functions.
I know this could be easily done with a custom function. However this would bring some complications regarding the workflow in my company.
Is there a way to accomplish that without using custom functions?
Thank You very much!
This works in Excel, so if you are able to export your workbook and save it as an Excel file rather than Google Doc this will work.
Go to your "Name Manager"
Create a 'New' name and call it "Sheets"
Insert this formula into the 'Refers to' box =TRANSPOSE(GET.WORKBOOK(1))&T(NOW())
Now insert this formula where you want the list of Sheet names =IFERROR(INDEX(MID(Sheets,FIND("]",Sheets)+1,255),ROW(A1),1),"")
Drag the formula down so A1 progresses (A1 represents the sheet number that you are getting the name of).
Source of solution

Resources