Google Sheet consolidate data - google-sheets

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

Related

IMPORTRANGE in Google Sheets preserving the structure of the destination sheet

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.

Importing data from another sheet where the entire row is not duplicated

I have a Google Sheet which has basic test data.
I need to import every row where the entire row is completely unique.
If any data in a row is different it should pull through to the other sheet.
Here is my test sheet with the data in 'Duplicate Rows'! and the data pulling through as is into 'Import'! https://docs.google.com/spreadsheets/d/1D1H2FLdyzr2iFwr_ENg6t2OAAsS8f71Mb4P5T_dtJ6g/edit?usp=sharing
I was going to use data validation to remove repeated rows from in the imported sheet but I can't find advice online that will consider the entire row rather than duplicate cells.
Either way I need to prevent these repeated rows.
You can use
=INDEX(UNIQUE(A1:C8))
(Do adjust the formula according to your ranges and locale)

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. :)

Copy the last populated row in a Google Sheet to a different spreadsheet

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

How can I mirror a few specific rows from one sheet to another sheet in Google Sheets?

That's simple i know that =Sheet1!B2 but if i add row above the B2. formulas automatically change to B3. I can write code google apps script but i need to do it with formula. By the way add row automatically specific time.
I want it to stay constant B2
In my testing it would be:
=INDIRECT("Sheet1!B2")*K2
The "Indirect" function returns a cell reference by a string, so the helpful google sheets can't change it by adding new rows.

Resources