I am using the google sheet script below to do Start and End Time on my sheet and it is working fine. I need to do it on another sheet (tab) with the same function not affecting the 1st tab. Can someone help me?

function myFunction() {
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Reymond");

function startTime() {
  ss.getRange(ss.getLastRow() + 1, 2).setValue(new Date());

function stopTime() {
  ss.getRange(ss.getLastRow(), 3).setValue(new Date());
  • 2
    Welcome to Web Applications I suggest you to start by reading developers.google.com/apps-script/guides/sheets, then learn the basics of JavaScript. Also it could be good that you follow the tour and read How to Ask. – Rubén Jul 23 at 4:31
  • Welcome. Would you please edit your question to explain how , when, why and by whom these functions are executed. The ability to run them on a second/multiple sheets is straightforward, but the specific code might vary depending on your scenario. – Tedinoz Jul 23 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.