Google Sheet Checkbox Script To Move Row - google-apps-script

I am looking to set a script for a checkbox in column A to move the row to a separate sheet. Essentially I want to move data that is checked complete to the "Complete" sheet. Can you help? I have found a few on via search, but I don't know if they are up to date. I cant get them to function.

Related

Google Sheet App Scrip Update Cell based on values of another

I'm trying to update cell values on open of a sheet and on edit of a specific cell.
On Open
In the sample sheet sheet 'Transactions' I am trying to set a text month(Q) and year(R) based on the date(B) if the either Q or R is blank.
On Edit
I am try to set Group(P) in sheet 'Transactions' based on the value in category(D) by looking finding the matching Group(B) value that corresponds to Category(A) in sheet "List". I'd like to do this both if Group(P) is blank and Category(A) is not blank or the user edits category(D) in sheet 'Transactions'.
I've been looking around a bit today for something similar on stack flow but haven't quite found it.
Thank you in advance for any help.
https://docs.google.com/spreadsheets/d/1QBq0fxty8K55UaM_uS42GY7dMpCHg4ClGMI4UtU-0T4/edit?usp=sharing
Why not just use Array Formulas?
Put this in the Months column, starting in row 2.
=FILTER(text(B2:B,"MMMM"),Not(ISBLANK(B2:B)))
Put this in the Year:
=FILTER(text(B2:B,"YYYY"),Not(ISBLANK(B2:B)))
Put this for the match:
=filter(VLOOKUP(D2:D,List!A:B,2,false),not(ISBLANK(B2:B)))
Make sure the rows below are clear, and it will auto-update as values are created.

Using onEdit(e) in google sheets to automattically add a value to a specific cell

I want to use the onEdit function to automatically add a value to an empty cell, I can't get the onEdit function to work however. How do you correctly use onEdit?
This sheet is connected to a form, if that form adds data to the sheet, lets say column 5, I want it to add a value to the cell G5.
How can I find out which column has been edited?
Please point it out if these questions have been answered before, I could not find anything about this topic.

Is there a Script to create a hyperlink within a column whenever a new row is created in Gsheet?

I am importing information into my Google Sheet which creates a new row automatically. Basically I need a script that when a new row is created, a hyperlink for cell 'V' appears in cell V.
Ive tried using only Google formulas as I have no scripting experience
I have no code sorry, I am a total Noob
Basically I need a script that when a new row is created, a hyperlink for cell 'V' appears in cell V of the new row.
Have you tried using arrayformula? =arrayformula(if(A2:A="",,hyperlink(A2:A,"link label")))
If you put this at the top of the spreadsheet, it will create hyperlinks for all of those URLs.
Maybe a spreadsheet example would help?
https://docs.google.com/spreadsheets/d/1lNfR-G_T7M5d8xi-UK1lLJGGJnxNox6iZYG0eykKV9I/edit#gid=0
If I'm still not understanding, feel free to edit that spreadsheet to make it more accurate for your specific case.

Adding button that adds custom sheet in Google Sheets

I'm working on a Google Sheet to perform analysis on the cyclomatic complexities of the software under test. There's multiple projects, and I've been assigned to, and completed analysis on, one of them. I wish to extend this Spreadsheet, such that, when a user hits "Add Sheet" button, they can create a sheet ready for data insertion and analysis.
The format of the sheet
Thus far, looks like this:
...
Strategy
I know that it's possible (as I have done from experience!) to create a container-bound Google Script to create Sheets. I just don't know how to create a button to do so, let alone at the Spreadsheet level.
Business Requirements
The header row should be copied over and formatted
Custom cells (in the "Already unit-tested?" column) should be insertable, and the "FALSE" one should be inserted on row creation
formulae for average complexity,standard deviation,median complexity,number of files computations should be inserted on spreadsheet creation and update upon row creation/state change of rows
I'm not sure the way to go about all this, let alone the score of this user story.
I’d put the button on a sidebar and in that case it can be any kind of html button you wish.
I'll try insert a menu in my spreadsheet, here you'll find custom menu documentation.
just create a function like newSheet() and trigger it when button is pressed.
for the first row and the format you can use srcRange.copyTo(destRange).
use a drop-down list for the "Already unit-tested?" column using data validation
and for the formulas just type in the formula and use range.setValues().

Can someone force-freeze this formula using INDIRECT()

INDIRECT() seemed easy for tiny formulas but it didnt seem that easy for the below formula. The reason I want to freeze is whenever I delete the rows in FormResponses, the formula in the second tab is going haywire.
So watevr happens in FormResponses, I want the formula to be rock steady.
=SUM(ArrayFormula(('Form Responses 1'!$B$2:$B=A2)*('Form Responses 1'!$A$2:$A)*(if(offset('Form Responses 1'!$B$2:$B,0,1)="Break Start", -1, 1))))
SAMPLE SHEET _ TAKE COPY
Unfortunately there is no way to lock just the formatting of a sheet or range. If they are locked it will prevent everything from being changed. Best bet for this would be to create a copy of the sheet, format it how you would like, and protect it from everybody.
Then there are a couple of options:
Go to the protected sheet, select all of the cells, and use format painter to copy the format to the working sheet.
Write a script to copy the format of the protected sheet to the working sheet.
Another option would be to write a script to set the format of sheet. This can be setup to happen when the sheet is opened, edited or when you manually run the script.
Or
To keep some of your data in the same place, you can freeze rows and columns:
Open a spreadsheet and select a cell in a row or column you want to freeze .
Open the View menu.
Hover over Freeze.
Select one of the options to freeze up to ten rows, or five columns. You can also choose Up to current row (or Up to current column) to freeze the rows or columns before a cell you've highlighted.