How can I create a button in Google Sheets that sets cells to today's date and time?

preview_player
Показать описание
This video describes how you can use Apps Script (JavaScript) to add buttons and run code in Google Sheets.

Рекомендации по теме
Комментарии
Автор

A few differences in how it works now, but this still works well. I did notice that it runs MUCH slower though. In yours, it's basically instantaneous, but on mine, it takes nearly 3 seconds to run with the exact same script code.

Google, come on...

eschelar
Автор

CTRL + semicolon automatically adds current date

reddicsteel
Автор

Thanks, I'm wondering is it possible to have the same thing but instead of the date goes to a highlighted cell, Can you make it so it just goes to A cells and every time we press the button it goes to the next blank cell, So if cell A1 already had a date in it, It would go to A2 automatically.

si
Автор

Hi Timothy, great video! Is it possible to show the date AND time in the cell?

garydavies
Автор

Thank you Timothy. Can you please create and post a video showing how to insert a new row on top with todays date on one of the cells? Also, how can this work on Google sheets phone app? I've followed this video, it works on my desktop but not on the phone. Thanks again for sharing.

wdj
Автор

Hi I need to add the hour to another cell without the date. How can I do it?

rafaelsantiago
Автор

can this be used as a static date/time stamp?
Hoping for your reply even though this video is more than 5 yrs old, your videos and contents are so helpful thank you very much.

discere
Автор

Hi Timothy, Im late to the party :) ....but just wondering what to use instead of getactiverange so that when the button is pressed it will always be in Cell B2 for example. Thanks

mabugho
Автор

Hi, you are the best! I'm looking to make a button to send the info typed to an another tab do you know how to do it?

Sanjirpinion
Автор

Like the video is there a way to have it update the date of a certain cell to the current date?

jonathanpine
Автор

Great video..
But can I enter only time?

divya
Автор

Hey man great video, How can you create a second button that generate a 30 day ahead date ? Alternatively is is it possible to assign the script to do it auto? Thanks again

osherezra
Автор

I don't think this works anymore, I keep getting an error that says "TypeError: is not a function"

mattbounds
Автор

Good start just not very useful. Usually buttons are meant to save time and effort. How would you be able to add buttons that affect cells next to the button placement? Without having to highlight the actual cell.

georgegonzalez
Автор

Is there a code or link to video where a button inserts rows at the top of the sheet?

bisonswag
Автор

Is this the paid version only? Insert drawing does not show up for me.

patriciahaas
Автор

Do you know a fix for this error? ReferenceError: "Spreadsheet" is not defined.

I have the same code input..

bisonswag
Автор

Here is another challenge i can process 200 claims a day and charge 1.68 per claim if a doctors call and ask me to do 21 claims can there be a button to push that would instantly give me her price in any cell i choose (just for 21)

gramps