Refreshing data used by a query from another sheet - google-sheets

I have three sheets, sheet A, B and C.
Sheet A contains data read from sheet B
Sheet B contains data read from sheet C.
Sheet C automatically builds from a big CSV file that updates every hour.
Sheet B reads parts of the data from sheet C.
Sheet A is used by external people.
The reason sheet A is not looking up data directly from sheet C is privacy and security reasons, that's why I hop through an intermediary sheet which the users of sheet A do not have edit access to.
Long story short: I actually only need to make sure Sheet B is automatically updating it's data from Sheet C, so Sheet A always looks at fresh data.
Is there no way to simply load/recalculate a Google Sheet on a schedule?
I see there are some answers here and there that seem to be ridiculously complicated, like setting up ITTT.com or adding macros that add and remove lines into spreadsheets etc.
Surely there must be an elegant way of doing this?

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.

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

Allow inserting new data lines but not changing formulas

is there any way how can I allow inserting new data lines for the user (with whom I share sheet) but not changing formulas?
My case: I created formulas for example for dropdown list in lines, other formulas for cells, etc. Now I want to allow the user to insert data to these lines, but I want to prevent him to change these formulas (ideally he should not be able to see or copy these formulas or entire sheet).
I know I can protect sheets/cells but this entirely disables edit for the user.
Is there any way please to accomplish what I need?
you can have two sheets - one for him/her and one for you. in your sheet you will have all your formulas. then you just connect these two sheets with IMPORTRANGE formulas (for example columns A, B, C from his/her sheet into your A, B, C ...and then your D column with formulas imported into his/her sheet' D column)
another way would be to use ARRAYFORMULA variants for all your formulas which would be sitting in a safe zone on the first row.
You can protect only selected parts of the sheet.
Go to Data -> Protected sheets and ranges...
Click on Add a sheet or range in the sidebar.
Enter name of the range.
Select Sheet as the option.
Check Except certain cells.
Add all the ranges you want the user to be allowed to edit.
Hope this helps!

How to split one sheet in more keeping references?

I am using Google spreadsheet and I have a huge amount of data on one Sheet.
Now, I would like to split that data in more sheets to make everything more structured. How can I move the data from one sheet to another keeping all the references (without rewriting everything on the new sheet)?
Also, If I have used conditional formatting, I want to keep it in my new sheet.
you will use formula for that like QUERY for example:
=QUERY(Sheet1!A:Z, "select A,B,D,E,X", 1)
and CF can be copy/pasted

Auto-updating "importrange" spreadsheet on Google site

hope someone can help me with this...
I've imported a range from spreadsheet A to spreadsheet B. When I change data on A, it quickly updates on B- all's good there. I embedded both spreadsheets A and B on a Google sites page, and embedded spreadsheet A updates fine, but spreadsheet B doesn't show the new data in Google sites, even though the actual sheet does change.
I notice that if I create a graph or some such change inside of spreadsheet B, the embed on the Google site then updates completely.
Any ideas how to make this happen automatically?
Bill
It's better to use Data Range to update value on the Column on the spreadsheet.
https://developers.google.com/apps-script/reference/spreadsheet/range?hl=FR#setValue(Object)
you import data with Import range , and you take all data with the Class Range and you put data on others columns.

Resources