Get current time in a cell and stop it from changing - google-sheets

Intuitively, one'd use =now() to get current time in a cell. However, every time some changes are made to the sheet, the cell's value changes to the current time. I only want to get the timestamp when the cell is filled for the first time, and it shouldn't change after that.
How can I do this?

If you just want to insert date or time once you can apply one of these shortcuts:
Place the cursor into the cell of interest and press one of the
following shortcuts:
Ctrl+; (semicolon) to enter the current date.
Ctrl+Shift+; (semicolon) to enter the current time.
Ctrl+Alt+Shift+; (semicolon) to add both,
current date and time.
Reference

Related

I would like to enter a future date in a cell and when it reaches that date the cell goes blank

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"; )

How can I fix the range of a Google Sheet MATCH function when using a move rows apps script?

I have a Google Sheet with a script to move rows at a set interval. The last row is moved to the top and all consecutive rows move down one, thus creating a loop. This sheet feeds a dynamic gallery of 10 stores which appear in consecutive blocks, managed by left and right arrows. Each block has a button which takes the value of the particular store of the block being viewed.
I want to register the row a store is on when this button is clicked so, in order to identify it, I have placed a MATCH function in a cell of each row with a formula like this: =MATCH("Store 10",B2:B11,0). All's fine up to this point however, when the row moves, the range also shifts. For example, when Store 10 moves from the last row to the first, the above formula changes to =MATCH("Store 10",B3:B11,0). This obviously renders the whole idea useless since Store 10, which now resides in the first row (B2), is not even found, since B2 is not included in the formula's range anymore!
Is there a fix to this or a better way to achieve my goal?
Try this in G1
={"title of column";arrayformula(MATCH(offset(B1,1,,10),offset(B1,1,,10),0))}

Add data validation and Formulas in one cell

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.

Display today's date in every cell in a single column in a google sheet

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

Working with intervals and data

I need do a chart with intervals (rangeSelector Buttons), so the idea that I have is, First of all, load the data by days to enable the rangeSelector Buttons.
Creating an event with setExtremes, I can tell when you click on a time interval and then here comes my question, it would be the correct method to add a new series to keep the information in the "Navigation" to be loaded before?
For example: http://www.coindesk.com/price/
When you click on the time intervals, the "Navigation" but does not change the "points" of the range

Resources