Copy sheet to another document to replace existing - google-sheets

I have such problem and half-of-solution already.
I've an active document with couple of sheets referring to each other. I need to do some changes in formulas, test it and ably implement the changes.
I've figured to make a copy of the sheet where I need to make changes to the side draft. There I make changes and tests and after that I'd like to copy the sheet back to the original document.
For now Google copies the sheet to the destination document as "Copy of Sheetname". Then I delete Sheetname sheet and rename the copy to Sheetname.
The problem is that the cells in other sheets which were referring to the original Sheetname now return #REF! error and I can't see any way to recalculate them efficiently.
Any (great) ideas? :)

Related

Align imported Data with manually added data

Example File: https://docs.google.com/spreadsheets/d/1Ht_2QMGMbHmlxSPoOiLX2vw78IL1wp3VhpOOc66eMqY/edit#gid=0
We are filling Point 1 - 4 manually. The data in A,B,C is sorted through C and will change every now and then. The problem I am noticing now is that A,B,C is moving. But D:G will stay in the same column.
We want to use this file to fill in the data since its our main file. So using the initial =query to also take into account D:G is not an option.
Would there be any other way to "link" D:G to the corresponding values in A:C?
Looking at your sheet I noticed you try a VLOOKUP formula.
Please try the following formula
=INDEX(IFERROR(VLOOKUP(A1:A;Blad1!A2:I;{6\7\8\9};0)))
Of course your approach would cause problems. You're trying to map manual data to some data that is bound to change. You can't expect the manual data to move or change in sync when the imported data changes.
You could probably make it work at least if the imported data does not change in order, and instead gets any new data appended. Even then, it doesn't help you if any of the imported rows gets deleted.
There are only two ways I could see to make this work:
Map your manual data as part of the original sheet where your other data is imported from. In other words, make D:G part of the source of A:C, if possible. This is the best approach. Works even when some imported rows get deleted or changed.
Don't sort A:C at source. Simply append new rows, and import as is. Keep your Blad1 sheet as the local source sheet, and add your manual data to D:G here. Then create a new sheet for sorting or do any other thing you'd like, and use this new sheet to feed your Blad2 sheet. This doesn't work if some of the imported rows get deleted or changed.

Google sheets dynamic copy/paste

I was doing a copy of data from one google sheet to another google sheet with references from another google sheet cells. However, when I insert a new row in between and add data in the original sheet, it doesn't get reflected in the new sheet. How can I make such a dynamic copy-paste in which newly added row can be reflected in the new sheet?
Try Importrange formula
As I understand, you are trying to copy data from Google-sheet1 to Google-sheet2
use this formula in cell A1 the Google-sheet2 where you want the data from the original sheet i.e. from Google-sheet 1
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/abcd123abcd123", "sheet1!A1:C10")
The only change you need to make is to change the URL mentioned in the formula to the URL of your Google-sheet1. Just copy-paste your sheet URL here. And define the Range - like what data from google-sheet1 should you copy to google-sheet2 (eg.A1 to E100) So, all the data in this range will be copied to your new sheet.
By doing this, every change you make in original-sheet should be copied in your second sheet.

Google Sheets: How to keep links to ranges pointing at the current sheet after it has been copied?

I have a sheet with some links to ranges in a frozen pane to help navigate around. The sheet is a template for future duplicates to be made. When I make a duplicate the links point to the 'parent' sheet and not to the newly made one. Is there a simple way to make these links point to the newly created sheet automatically when the sheet is duplicated?
I created the links using the insert link (ctrl k) method (just linking to a cell) and have tried using named ranges but that didn't work.
Any help would be much appreciated. Thanks.
Apologies. I took a break, had a cup of tea and then came back to this and found a solution to my problem. I used a script to get the URL of my sheet then just concatenated that with the cell addresses to get links that update every time I copy the sheet.
Thanks to Max, here: https://webapps.stackexchange.com/questions/93305/how-to-find-url-of-the-current-sheet
Sorry for the time waste - maybe there's a better way...?
When you say duplicated, do you mean:
copied and pasted into a new workbook file
duplicating the file using File > Make A Copy
copying the cells and pasting in a new tab within the workbook
Based on your question, it seems that you are asking about copying and pasting within the same workbook. The Insert Link method treats the hyperlink as an absolute value, so it would still link to the original cell.
Solution
To create relative hyperlinks you need to use the HYPERLINK() function.
=HYPERLINK("[link to sheet]/edit#gid=0&range=" & SUBSTITUTE(CELL("address",C2),"$", ""), "Best Doctor")
Go to the cell that you want to link to > Right Click > Get link to this cell
In the cell with the link, use the HYPERLINK function and paste in the cell URL
Need to replace the absolute cell address in the link with a relative one, using CELL and SUBSTITUTE
CELL gets the absolute cell reference $C$2, but the link won't work with the '$', SUBSTITUTE strips those out.
Use '&' to concatenate the link up until 'range=' with the cell reference formula
Now, as long as the cells remain in the same relative positions, you can copy and paste them anywhere else in the workbook.
Example
Link to workbook

Google Sheets Filter Function - How can I make data static?

Im trying to make the data that I sort using a filter function stay static in the cells that is is sorted in. I have had this problem a few times and have tried looking it up on Youtube but it seems to be more of an advanced question.
For example when I filter a row of data from one sheet to the next. It is not static data, meaning when I delete the data on the new sheet it stays there until I delete the data on the master sheet.
Please few my example spreadsheet here.
Google Sheets Example Spreadsheet
Any formula (like FILTER) can only process source data. It is linked to the source data permanently. Think of it as a mirror of the source data (and think of changes the formula makes to the source data as a funhouse mirror). You cannot have formula results that you change manually.
If you want a copy of the original data that you can change (and that will no longer be linked to the original data at all), then just select the range containing the original data, Copy it and Paste it to the new location.
If you need some kind of link or updating when the source data changes, or you want the ability to change the source data when you update the copy you made, this requires writing custom scripts. It cannot be done with formulas.

Google spreadsheet complex formula

I am really new to the Google spreadsheet formulas. I have searched and searched and what I try I fail at in making this complex formula. I would appreciate any help given.
I am trying to get cells copied from sheet1 into a sheet3 based on answers/criteria in various cells in the row. If the project is completed then there are 6 Yes/No answers in each row. I need to copy the row information if it has "completed" in ColA along with copying specific cells if there is a Yes.
For instance: Copy B and D:F plus if E=Yes copy E-J, if K=Yes copy K-L, if M=Yes copy M-Z, if AA=Yes copy AA-AD and so on. If there is a No to any of those just disregard do not copy.
I have tried this but it does not work:
=IF(Sheet1!M2="Yes", Sheet1!M2:W2, IF(Sheet1!X2="Yes", Sheet1!X2:AK2, IF(Sheet1!AL2="Yes", Sheet1!AL2:AS2, IF(Sheet1!AT2="Yes", Sheet1!AT2:AW, IF(Sheet1!AX2="Yes", Sheet1!AX2:AZ2, "")))))
My Google spreadsheet is here, showing the content I want to move to Sheet3 :
Testing spreadsheet
Your if statement is structured fine, the problem is that you cant refer to an array that way to pull in the row, however you could structure each portion of your if statement like this:
=if(Sheet1!A1="Yes",SPLIT(JOIN(";",Sheet1!1:1),";"))

Resources