Hot to track Progress with Checkboxes in Google Sheets

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024
  • In this tutorial, learn how to automate your Google Sheets workflow using Google Apps Script. We'll walk you through creating a script that moves entire rows to a designated "Completed" sheet when a checkbox in column A is checked off. This script streamlines your task management process, helping you keep your sheets organized effortlessly. Whether you're tracking project tasks, to-do lists, or any other tasks, this automation will save you time and simplify your workflow. No coding experience required - follow along step-by-step and enhance your Google Sheets productivity today!
    Code:
    function onEdit(e) {
    var ss = e.source;
    var activeSheet = ss.getActiveSheet();
    var range = e.range;
    // Check if the edited range is in column A and the value is true
    if (range.getColumn() == 1 && range.getValue() == true) {
    var targetSheet = ss.getSheetByName("Completed");
    var targetRange = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);
    var rowToMove = activeSheet.getRange(range.getRow(), 1, 1, activeSheet.getLastColumn());
    // Move the row to the target sheet
    rowToMove.copyTo(targetRange);
    activeSheet.deleteRow(range.getRow());
    }
    }

Комментарии •