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.
Related
Suppose that we have the following Google Sheet (called File_1):
And we import all the columns (A to C) via IMPORTRANGE("https://docs.google.com/spreadsheets/...", "Sheet1!A:C") into another sheet (called File_2), which also contains an additional column New_col with some data in it:
Now, suppose that the source sheet changes like this, i.e., a new row is added in-between the existing rows:
The destination sheet will become like this, in essence keeping Column D in its previous state and 'breaking' the relation of the 'test' value in cell D2 with the A1-B1-C1 row.
What I would like to have instead is the following destination sheet:
Is there a way to do that from within Google Sheets?
You are describing how formula results get misaligned with manually entered data. There is no turn-key solution to work around the issue. Lance has given a thorough treatment of the row misalignment issue and how it can be dealt with in some cases.
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
I'm trying to consolidate the data from different sheets in the same File for Google Sheets. However, I get the following error:
Error
Array result was not expanded because it would override data in A3
Basically, I wanted it to get all the values within each sheet range and insert it into one sheet because re-entering the same data twice is very time consuming
Here is what I have tried that causes the error:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1iS3hBtbkAyi5ql9V-6YwerQWXKx2ED8SR5bR3PY3Bm4/edit#gid=0", "Sheet2!A2:B30")
When you get those kind of errors is because you are importing a matiz of information that if shown will override data that you already have in your sheet.
What I recommend to solve this usually is to create a new sheet and make the import in a blank new sheet but if you are trying to consolidate 2 columns into 4(2 of each duplicating the data) make sure that you are giving the correct space between each other, for example I guess you will want to put the first import in cell A1 and the second in C1. And if you are putting just one IMPORTRANGE formula in a sheet with data already there just make sure it won't overlap.
This means your problem is basically information overlapped when
importing using IMPORTRANGE formula
Basic things to try to resolve the issue or find out a path to do it can be:
select cell A3 and push delete button.
Or
create a new sheet and try the formula again with an empty sheet.
delete everything you have in cell A3 or add a row between A2 and A3
or use this formula:
=IMPORTRANGE("1iS3hBtbkAyi5ql9V-6YwerQWXKx2ED8SR5bR3PY3Bm4", "Sheet3!A2:B2")
I'm new to programming and would really appreciate some help.
I have two different spreadsheets, one named Database (this is where we put all the details) and the other is named Checklist, both have 1 worksheet each named Sheet1.
Now, what I wanted to do is to get the last populated row from the Database spreadsheet into the Checklist spreadsheet.
I know a formula like:
=FILTER('Sheet 2'!A:A , ROW('Sheet 2'!A:A) =MAX( FILTER( ROW('Sheet 2'!A:A) , NOT(ISBLANK('Sheet 2'!A:A)))))
This gets the last populated row, but this only works within one spreadsheet and doesn't work when I'm working on two different spreadsheets.
How can I get this formula to work with 2 different spreadsheets?
Thank you so much
To access data from another spreadsheet, you can use IMPORTRANGE() (documentation). I suggest you create a new sheet in your Checklist spreadsheet and import the sheet you need from Database into it. Then you'll be able to use your formula.
In Checklist, create a new sheet called "[IMPORTED] Database" (or something like that)
In cell A1 of "[IMPORTED] Database", enter =IMPORTRANGE("database_spreadsheet_url", "Sheet1!A:Z") (modify the range to be what you actually need)
Now adjust your formula for getting the last value to be =FILTER('[IMPORTED] Database'!A:A, ROW('[IMPORTED] Database'!A:A)=MAX(FILTER(ROW('[IMPORTED] Database'!A:A), NOT(ISBLANK('[IMPORTED] Database'!A:A)))))
I'm trying to build a webapp based on Google Sheets. I'm a little bit confused with the API. I have a spreadsheet which is shared with me by Drive and contains 2 sheets. I can get the first sheet with
GET /v4/spreadsheets/{spreadsheetId}
Returns the spreadsheet at the given ID.
endpoint. But I couldn't figure out how to get the second sheet. Is there a way I can get spesific sheet from a spreadsheet?
The problem in here is when you are using ranges parameter you have to specify the sheet title with A1 notation syntax as described in this document: https://developers.google.com/sheets/guides/concepts#sheet_id
I was using the ranges parameter and using the A1 notation correctly but I wasn't specifying the sheet title. In that scenario the default sheet is the first one. If you want the get another sheet other than the first one you have to specify the title, like this:
https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}?ranges=sheetTitle!A3:F20