IMPORTRANGE in Google Sheets preserving the structure of the destination sheet - google-sheets

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.

Related

Trying to index match data from a different workbook

My colleague collects data in Google Sheet A. I want to reference and index-match some of that into my sheet B where I track the progress of projects. I've tried two different ways of doing it, and neither of them work for me.
Here are the two ways I tried:
I created a new tab in sheet B. Then I used importrange to sync with the data from sheet A. Then I used index match to reference the data from the importrange in the same sheet. Indexmatch did not work with the importrange data. Only once I copied and pasted it as values, did the data come over, but that of course broke the live synced importrange.
I tried to do the indexmatch and importrange at the same time using this formula from this forum:
=INDEX(IMPORTRANGE("SheetA",Tab"!A4:H26"),MATCH($Cell,IMPORTRANGE("SheetA",Tab"!A4:A26"),0))
But that just gave me an error.
Any other ideas on how to approach this?
use vlookup:
=VLOOKUP(A1; 'Sheet A'!A:H; 2; 0)
Maybe because it's just schematic, but have you used the quotation marks this way? --> Tab"!A4:H26"
You should use them like this --> "Tab!A4:H26"
And when you write "SheetA" you're writing the Spreadsheet Id, right??
And you should add another comma before the last parenthesis and tell which column you want to grab the final data from (1 for Column A, 2 for column B, etc.)

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.

Google Forms changes cell reference on different sheet in Google Sheets

I'm building a spreadsheet to track my macronutrients and calories. I made a google form for inputting information and it populates a "responses" sheet on google sheets. I made a different sheet within the same spreadsheet to perform all the calculation and generate graphs.
But every time I enter a new response into the form, it creates a new row and changes all the cell references in the calculations sheet. For example, I reference cell A2 from the responses
='Form Responses'!A2
and when I actually fill out the form and it populates, A2 in the responses sheet is filled in but the reference in my calculations sheet has been changed to A3.
='Form Responses'!A3
I tried using $ but it did the same thing, automatically changes the cell that I referenced.
Any way to have my calcuations sheet reference the newly created rows automatically?
In a new tab use for example, = {'Form Responses'! A: Z} and use this data to do your calculations and you will have no problems!
Solution
To avoid the row value to change reference when adding a new response, you will need to add the $ next to the number instead of next to the column value (A):
='Form Responses'!A$2
Moreover, an easy way to reference your whole column is to reference a range instead such as:
='Form Responses'!A:A
And then just drag it through your column. If you want it to be more specific (select the range you want):
='Form Responses'!A2:A999
I hope this has helped you. Let me know if you need anything else or if you did not understood something. :)

Google Sheet consolidate data

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

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.

Resources