Reference a Cell as the Name of a Sheet in Another Workbook - google-sheets

I have ~400 sheets spread through multiple workbooks (on purpose). Each sheet is the scoring for an entry in an award competition.
I have a master scorecard sheet that grabs the score from each sheet, regardless of what workbook it is in. I have been able to set up the formula so, if I hardcode the name of the sheet in some other workbook, it correctly grabs the data:
=(IMPORTRANGE("LINKtoWORKBOOK","SHEETNAME!CELL"))
But this requires identifying SHEETNAME in every instance of this formula. I would rather create a single column that lists the names of each sheet, and then for a given row, have that row's formulas all look to the cell with the sheet name.
I've tried using INDIRECT but had no luck. I think I am close:
=(IMPORTRANGE("LINKtoWORKBOOK",(INDIRECT(CELLwithSHEETname&"!CELLonTHATsheet"))))
I've tried variations of quotes and moving parenthesis with no luck.

The second argument of IMPORTRANGE should be text value (string) so you can concatenate the sheet name to the cell / range reference. I.E. if A1 has the sheet name use
=IMPORTRANGE("spreadsheet_key",A1&"!A1:Z")
NOTES:
INDIRECT function can't be used because it returns a reference as if it is directly written in the formula, i.e.
=A1
is the same as
=INDIRECT("A1")
but IMPORTRANGE requires that the second argument be a text value, so the above will only work when A1 has something like A1:Z or Sheet1!A1:Z (without the equal or plus sign)
Arrays can't be used as arguments of IMPORTRANGE. In other words, something like
=ARRAYFORMULA(IMPORTRANGE("spreadsheet_key",A1:A10))
doesn't work. In this case the alternative is to use multiple IMPORTRANGE, one for each reference.
Related
Using IMPORTRANGE, INDIRECT, and CONCATENATE together
Using IMPORTRANGE as an array formula
ArrayFormula + multiple IMPORTRANGE + QUERY

Related

Unique Filter multiple sheets with ArrayFormula

I have no idea how to title this post, apologize in advance.
I have several sheets with a number in Column I and a name centered and merged in columns A:H. I want to obtain the name from A:H of the corresponding value within I but do have duplicates, therefore I need the nth value when permitted. The formula I have so far works up to the point it does not autofill down as an ArrayFormula, so when I drag the formula down I get an #REF! error due to the fact that when a duplicate is found it cannot overwrite the formula below.
This will be easier to showcase: LINK TO SHEET.
Essentially, in the main sheet all the values in I:I of all the other sheets are obtained and sorted, then using that column I want to return the name that corresponds to the value, allowing for duplicates to work themselves out. I believe my issues resides in the $B1 part at the end of the formula preventing it from being an array.
=ARRAYFORMULA(UNIQUE(FILTER({Sheet2!$A$1:$A;Sheet3!$A$1:$A;Sheet4!$A$1:$A},{Sheet2!$I$1:$I;Sheet3!$I$1:$I;Sheet4!$I$1:$I}=$B1)))
Cell F2 on the Sheet1 tab:
=QUERY({Sheet2!A:I;Sheet3!A:I;Sheet4!A:I},"select Col1,Col9 where Col9>0 order by Col9 asc",0)
You can read more about query here.

Utilising COUNTIF in array formula in Google Sheets

I have some data that I want to summarise at a grouped level, where the possible values for each group are given as a pipe-delimited string. I then perform a sumifs by summing over multiple arrays, one of which includes a COUNTIF() with a SPLIT() in order to establish if the row features in this set of values.
The formula works fine but I would ideally like it to function as an array formula so that if the number of groups changes, the number of rows the formula is applied to will also change.
See sample sheet here. Raw data is in the tab "data", the groupings data is in the tab "Groupings" and it is the formula in column C on the "Summary" tab that I want to make work as an array formula.
I think the easiest way to do this is to mark the Group on the Data sheet and then use a traditional query to add up the groups. This vlookup should do it in cell D1:
=ARRAYFORMULA({"Group";IF(A2:A="",,VLOOKUP("*|"&A2:A&"|*",{"|"&Groupings!D:D&"|",Groupings!C:C},2,0))})

Google Query on the results from unique function

I am using google sheets and applied a UNIQUE function on a set of columns and want to apply a query function to take couple of columns and all rows from the the results to a different sheet, but I am getting blanks.
Can you please suggest what am I doing wrong?
Does the Query function not work on the results from UNIQUE function?
Open or create a sheet.
Select a cell.
Type = followed by the sheet name, an exclamation point (!), and the cell being copied.
For example, =Sheet1!A1 or ='Sheet number two'!B4.
Note: If a sheet name contains spaces or other non-alphanumeric symbols, include single quotes around it (as in the second example).

Import named range data between Google Workbooks

If within the same Google Sheets Workbook, the formula: index(namedRangeRow , namedRangeColumn) works beautifully to "pull" or extract the piece of data residing at the intersection of the named row and named column onto another Sheet in the SAME Workbook.
How do I write a formula to get the same effect when I want to pull data from a DIFFERENT Workbook? I presume it is importRange, but I can't seem to get that formula to recognize two named ranges and find the data at the intersection thereof.
The formula: importRange("key", "namedRangeRow") works great, but it pulls all the data in the target Workbook range. So, I presume it's some variation of that formula, I just can't find the right way to express the two ranges within the importRange function.
The formula in the image below pulls a value in a cell at the intersection of two named ranges from a separate Google spreadsheet (i.e., workbook). (Link to sheet.)
The sheet where the data resides is below. (Link to sheet.)
The SetLinkData sheet is the 2nd sheet in the Set List workbook as in the pic below and contains the ID of the Song Catalog sheet.

How to get last value of column in multiple sheets and add them together

I'm currently trying to get the last value of Column "D" in several sheets, then add all the values together, then calculate a percentage based on a value from a main sheet cell.
I can get =VALUE(D:D) to work and =VALUE(Animations!D15), but not a combination of both which is what I need (since the size of the column will continue to grow).
It would be best if it was the last numerical value in column D, and not account for blank spaces or strings.
Thanks!
To find the last populated number in a column use Index with an approximate Match to 1E+99.
=index(sheet2!d:d, match(1e99, sheet2!d:d))
The above retrieves the last number in column D on Sheet2.
Google sheets will not process an array of worksheet names through INDIRECT like Excel will but a 'helper' column will take care of that. If you want to hard-code a series of worksheet names into a sum of index/match formulas, then Indirect isn't even necessary.
In the accompanying linked worksheet, I've used this method to retrieve the last number from columns with numbers, text and errors. I've thrown in the 'last number' cell address as well.
Linked spreadsheet

Resources