Duplicate sheet with command buttons and hyperlinks to new sheet and a new name - duplicates

I have an excel sheet named “Recipes” that has formulas and data references that I want to fill out and click a “Save & New” button that duplicates the sheet with the command buttons included to a “Recipe 1”, “Recipe 2”, etc. sheet. A bonus feature would be to clear the original recipe sheet as though it’s an entry form.
I know how to copy and paste a VBA code to a command button but don’t know how to write code myself.

Related

Named Ranges have sheet name stuck in them when sheets are copied from certain spreadsheet

I'm merging the different versions of a D&D template and noticed that copying sheets from a certain one of them to an existing/new spreadsheet causes the Named Range names to contain the sheet name, but in some kinda ghost form (e.g.: if trying to edit the Named Range, the name shows normally). Any clue what's causing this, how to fix it, or how to get around it?
Though I manually fixed them all by deleting and re-creating back-to-back, that version of the template might get updated in the future and I'll have to consider repeating this process.
"copy of WildShape" spreadsheet
image - "copy of WildShape" sheet's
Named Ranges
see "WildShape" sheet of merged version

Google Sheets Script To Check Changes From One Sheet File To Update Another Sheet URL

Apologies if something like this has already been asked, I have little to no experience with this.
Is there script that can check a Google Sheets workbook for edits to then affect a different Sheets workbook. I have found something along these lines but it always references the same workbook and moves the entire row.
I have a spreadsheet that contains multiple lists of users (Sample Move) and another staff member has a sheet containing activity status and other details (Sample Edit). When a user is placed on the Sample Edit spreadsheet, they would then need to be moved from their respective Active list and moved to the corresponding Inactive list. Users would not need to be automatically added back to the active list once they return, that would be a manual process.
Link to example Sample Move: https://docs.google.com/spreadsheets/d/1q3yRMa5sum8dHLyw_2ppLaWBUEoj_Gl6F_btWIiqsfw/edit?usp=sharing
Link to example Sample Edit: https://docs.google.com/spreadsheets/d/1IZzoJQkFsavgnjkwz1GkuwDj-m6kG-CYQfLKx2EmPSI/edit?usp=sharing

In google sheets is there any way to use importrange but maintain formatting? (no paid add-on)

In google sheets is there any way to use importrange but maintain formatting? Aware of SheetsGo but don't want a paid solution. Not referring to conditional formatting specifically, more row colors, etc.
You can't import formatting directly. But there is a simple solution, which I use all the time. For the sake of explanation, let's say your source spreadsheet is called "Source" and your destination spreadsheet is called "Destination." From there:
1.) Open Source and go to the sheet you want to have imported into Destination.
2.) Right-click on the tab that shows the sheet name. Choose Copy to > Existing spreadsheet. Use the search tool to find Destination. Click on that sheet.
3.) Open the Destination spreadsheet.The Source sheet will appear there, with the name "Copy of [sheet name]" and with all formatting from Source. Change the sheet name as you like. Then just click the upper-leftmost empty rectangle (between A and 1) to select the entire sheet and hit the Delete key. This will leave just your formatting. From here, you can now enter your IMPORTRANGE formula(s), and they'll populate without changing the formatting.
This might sound like a lot. But in actuality, it only takes 20 seconds to do.

Hide formula bar in google sheets

I want to achieve the following:
I do not want other users of the sheet to access the formula bar for certain cells/sheets of the spreadsheet
I want to block them from accessing the script editor (do not want to show the code) used for this sheet
I do not want other users of the sheet to access the formula bar for certain cells/sheets of the spreadsheet
This is not possible.
You could publish your spreadsheet but this will not allow to edit any content, or to use Google Forms, but this will allow respondents only to submit data, not to view the result of calculations.
To securely hide the formulas they should be in another spreadsheet. You could use IMPORTRANGE or a script to import/export the calculations result. Bear in mind that IMPORTRANGE isn't recalculated immediately and that scripts could be slower than built-in functions.
An alternative is to create a web app that makes the calculations and call it from a custom function.
I want to block them from accessing the script editor (do not want to show the code) used for this sheet
It's not possible to block editors to access the Script editor. For details see
Scripts Bound to Google Sheets, Docs, or Forms. To prevent that viewers get access to the code, block the spreadsheet for making a copy. For details see Change your sharing settings
You can set permissions per cell:
- Click the cell
- Left-mouse click or Ctrl+click -> menu 'Protect range'
- Click 'Set Permissions' in sidebar
- Select Only You
Now the content is still visible.
There is a work-around for this, which is quite complicated.
- Create another sheet, called Formulas.
- Protect this sheet the same way above.
- In your main sheet you can refer to formulas in the other sheet: =Formulas!B1
- Now you can write the formula in this cell B1 in sheet Formulas
=Sheet1!B1+Sheet1!C1-Sheet1!D1 (where Sheet1 is the name of the first sheet)
- Now hide the Formulas sheet

How do I copy a script from one spreadsheet to another spreadsheet?

I need to copy an existing script, which I did not write, into my existing spreadsheet. The script is called "SaveBack", and can be found here: https://docs.google.com/a/levelgroup.com/spreadsheet/ccc?key=0Agcb8bUVVOOodHhoV3BrRGZ6UEdSYnVLSEk3bllxRnc#gid=1.
My existing spreadsheet is too complex (it has many other spreadsheets that link to it) to copy all of its sheets into the spreadsheet that contains the script. I have already copied the SaveBack editor sheet template sheet to my main spreadsheet, but I can't figure out how to copy the SaveBack script that goes along with it into my spreadsheet.
Can anyone help? Thanks!
Open the save back script, select the script text, copy it, go to your sheet, create a new script (blank template), paste the script you copied into your new script, name is SaveBack (assuming it's a project), check the triggers on the original script and make sure your triggers match, and you should be good to go. You will have to change any sheet, document, or other string ID's to match your files' Id's, but that isn't too bad.
I do this sort of thing all of the time when I'm migrating things back and forth between my work and personal account. You could also create a copy of the other person's spreadsheet that you linked above, and it will move the script over with it. Then you can go to the script and get the project key to use it as library in your own scripts. Since you're using your copy as the library, you don't have to worry about someone else changing the script and breaking your functionality.