How to prevent the automatic updates between google-sheets when using IMPORTRANGE - google-sheets

I got a google-sheet-1 reading data from an other google-sheet-2.
The data of google-sheet-2 runs on a scheduler.
In my google-sheet-1 the user enter a new line with the date of the day and IMPORTRANGE get the data from google-sheet-2 and add it to the new line.
My problem is that IMPORTRANGE syncs all lines of google-sheet-1 to the latest values of google-sheet-2. I would like to read the value only once and break the automatic update... Is this possible or am I thinking about it the wrong way...

Related

Automating Aggregating Data in Google Sheets

I have 100+ rows that are updated daily and as of now I have to update my last column manually. In my last column "Key Results Aggerated" I have to manually copy and paste Key Results into single cells per employee. I spent hours trying to figure out a solution but I am unable to. I have tried using import range function and concatenate function but I am having a hard time automating it since users can always add/remove a new row for "Key Result" at any time of the day. Thanks in advance. 🙏
Pic: Raw Data
Pic: Results I am trying to achieve.
Google Spreadsheet Example
You may insert this in E1 and protect that row:
={"KEYS";MAP(A2:A,D2:D,LAMBDA(aval,dval,IF(aval="","", TEXTJOIN(CHAR(10),1,dval:INDEX(D:D,ROW(dval)+IFNA(XMATCH("*",INDEX(A:A,ROW(aval)+1):INDEX(A:A, ROWS(D:D))),ROWS(A:A))-1)))))}
Erase previously all the prior formulas in E. Let me know

Google Sheets IMPORTRANGE and QUERY not refreshing

I have been using IMPORTRANGE and QUERY extensively to connect all of my spreadsheets for a while now. But recently noticed that IMPORTRANGE and QUERY will not return proper data unless the source Sheet is open. Also, the data used to automatically update (every 30 min or so, whatever the default refresh rate is) in the background for IMPORTRANGE, but now it will only update if I manually open the Sheet and it will display "Loading...." before returning the data.
Is anybody else having issues with these two functions?
This answer explains the issue you encountered.
In summary:
It doesn't update when the sheet isn't opened.
Recalculation only happens when sheet is opened.
Functions that pull data from outside the spreadsheet recalculate at the following times:
ImportRange: 30 minutes
ImportHtml, ImportFeed, ImportData, ImportXml: 1 hour
GoogleFinance: may be delayed up to 20 minutes
Alternative solution:
You can use time driven triggers and update those values every N minutes/hours instead BUT you will have to create a script for that.
Everytime you trigger, you'd have to use setFormula on every cell you used your importrange and query.
References:
setFormula
Choose how often formulas calculate
Time Driven Triggers

Why does =Importrange() cause a #name error in Google Sheets?

ImportRANGE returns a #NAME error occasionally as it updates itself every 30 mins.
I took a look through Google Sheet Script Returning #NAME? but there sadly wasn't any solutions. The best guess at a response was about how google sheets loads custom formulas, but since =IMPORTRANGE() is a vanilla formula it shouldn't have a problem with that.
My formula is
=IMPORTRANGE("URLHERE",(A5&"!"&"D1"))
First the URL, then the final section allowing it to request data from a different sheet in the file for every line. I have setup the sheets that contain the source data to be called 1,2,3,4, ect up to 100 to accomodate for this.
I am trying to import data from a different sheet that has a custom script running to import JSON data. The JSON is imported perfectly and once a day a macro will run that updates the JSON values. I have a separate sheet that I don't want to run the script on, so I am using IMPORTRANGE to get the data from JSON imports. Every 30 minutes Importrange updates itself and it researches for the values. It would work fine for me for this to be once a day, however, I can't find a way to change that.
Most of the time it has no problems, occasionally it has a problem with a couple of the imports but most are fine. A couple of times it has hit #NAME on every single IMPORTRANGE.

How Can I Set a Formula to Only Update Once

I'm collecting Google Form responses in a sheet, and merging over a variable to keep track of who in my roster has responded.
My issue is I'm having to bring the Form responses into the current sheet with IMPORTRANGE, and everyone once and a while, that formula inexplicably returns
"#REF! Import Range Internal Error"
for up to a few hours before correcting itself. This means my completion tracking isn't working at that time.
Is there a way to set a simple function like =A2 to only update when text is added, and not if it disappears?
I want a sheet to contain the data in the imported range and add to it as more form responses come in, but also keep all the data if the imported range disappears.
just put your IMPORTRANGE formula into IFERROR eg:
=IFERROR(IMPORTRANGE("ID", "Sheet1:A1:B"))
this way you will get either values you need or nothing till #REF! disappears.

Google spreadsheet CTRL+Shift+E

I have spreadsheet with two sheets: current_sheet and archive_sheet.
I also have a script (which I created) which removes data from current_sheet and appends it to archive_sheet once per month.
The sheets have an arrayFormula, and after every monthly move operation, cells with this arrayFormula wind up without any results - and I receive a warning message, indicating that I should press Ctrl+Shift+E in order to resolve the problem.
Once I've done so - the formulas work again. What I'm wondering is... how can I alter my script so that I don't have to provide this manual fix every month?
use a time driven trigger to run your script each month
Instead of using script to move your data each month, try copying the values, then clearing the original data and reinitialise the formula. Without seeing your formula and have a clear understanding of what your doing, im kinda punching in the dark.

Resources