I am trying in google sheets to add a data validation where users can select ( Today, Incomplete) then if selected "Today" the cell will display today's date, and if "incomplete" then just display it as it is.
I did the formula
if(E2:2="Today",(TODAY()),"Incomplete")
But then add validation removes the formula if selected Today. Can someone help me, please.
Create a tab called 'DVs'
in A2 of that tab write "Incomplete".
in A3 of that tab, manually put today's date.
then point your Data Validation at those two cells.
then Tools>Script Editor.
then erase the code that is there that looks like this:
function myFunction(){
}
then paste this code.
function setToday(){
var date = new Date();
date.setHours(0,0,0,0);
SpreadsheetApp.getActive().getSheetByName('DVs').getRange('A3').setValue(date);
}
then Save.
Then click on the little alarm clock at the left to open the triggers.
Then at the bottom right, click on the button to add a trigger.
then choose the function, and set a "time driven" trigger that runs every day after midnight.
Then Save.
That should do it.
Related
I have spreadsheet with dozens of sheets with long names. It is very hard to find them in the list-menu etc. Is there a way to filter/find by part of the name?
The only way I found is to click Alt+/ and search for "Go To Range", and then type TheRequestedSheetFullName!A1 and jump. The problem is the names contains few words, and it is hard to hit exactly the correct name (I want filtering/searching by part of the name).
Yes. In the upper left corner of any sheet (to the far left of the formula bar), there is a field that, by default, shows the current selection in the current sheet. However, if you click in that field and start typing part of a sheet name, a list of all sheets that match will appear. You can then just click on the sheet you want from the shortlist that appears. By default, you will be brought to cell A1 of the sheet you select.
You can make a summary, then search with Ctlr+F
function listOfSheetsWithLinks(){
var ss = SpreadsheetApp.getActiveSpreadsheet()
var summary = ss.getSheetByName('summary')
summary.getRange('A:A').clear()
ss.getSheets().forEach((sh,i) => {
summary.getRange(+i+1,1).setFormula(`=hyperlink("#gid=${sh.getSheetId()}&range=A1";"${sh.getName()}")`)
})
}
I am working on a on call sheet, in column f it is a "do not call until further notice". I would like to be able to put a future date in that cell and when that comes it clears the contents in that cell. I am using a filter function and when it looks at the do not call column it is looking for a blank cell to move the info to the proper sheet. Everything works great accept trying to get the date to disappear thanks in advance.
I would like to enter a future date in a cell and when it reaches that date the cell goes blank
=IF(TODAY()="12/12/2033"; "12/12/2033"; )
Let's say there are 50 sheets with thousands of rows of data, and I change one cell's value today at 15:00.
In version history, I will see that today at 15:00 there was a change.
But if I click on the earlier version, I would have to manually find the changed cell's green highlight.
This is unfeasible if there are a lot of sheets, takes too much time to find actually what was changed.
Is there a better way?
Select an earlier version.
On the top right of the sheet you'll see "Total: X edit(s)" with an up- and down-arrow.
Click those arrows to jump to the next/previous edit.
https://www.howtogeek.com/394447/how-to-see-recent-changes-to-your-google-docs-file/
If you don't expect a lot of changes, I'd probably consider using the onEdit() function to get the cell that changed, and insert this sheet!cell ref plus datetime in a new sheet - maybe even make a link of it so you can go directly to that cell if you want.
Then add a function in onOpen() to clear this new sheet of any entries older than x?
I'm working on a spreadsheet in Google Sheets for multiple people, and indicate in a column who the person the information on that row pertains to. I want to format cells on that column, only when they're not empty, based on what person is selected in another cell.
I can create functions to format things based on another cell's entry, but I don't know how to compound that with a function for not being empty. Sorry if this is super basic, I just can't figure it out.
Yep. This is a super simple thing to do.
1) Highlight the column where the person's name appears.
2) From the main menu, select Format, Conditional formatting.
3) In the sidebar click add a new rule. what you want to do is create one rule for each name that appears (or could appear) in that column.
4) Under "Format cells if, select "Text is exactly"
5) Type the name in the cell where it says Value or Formula
6) Choose a background colour to suit.
7) Click Done.
8) Repeat steps 3 to 7 for each person; but change the background colour in each case.
Here's an example.
I'm trying to display the current date in every cell in a single column in a google spreadsheet. =today() displays the current date in any cell, but I can't figure out how to make it work in an entire column.
I tried =arrayformula(TODAY()), but it only works in the cell it's in.
Any ideas?
You need some way of introducing a condition on each row, e.g.
=ArrayFormula(IF(ROW(A:A),TODAY()))
You have to make an array operation - any, to make Arrayfromula works, so eg:
=ArrayFormula(IF(row(A1:A),today(),))
will work