S
S
Suil2020-10-08 10:47:48
Google Sheets
Suil, 2020-10-08 10:47:48

How to move a row to another sheet by condition?

Good afternoon.
Please tell me how it can be implemented.

When the status of the application is changed to "Completed", the entire line is transferred to another sheet.

5f7ec3ece1b6b716933504.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Biryukov, 2020-10-14
@Suil

If via Google Script:

let ss = SpreadsheetApp.getActiveSpreadsheet();
let zayvkaSheet = ss.getSheetByName('Заявки'); //или как нужно лист назвать
let doSheet = ss.getSheetByName('Выполнено');

function onEdit(e) {
  let cell = e.range;
  if (cell.getSheet().getSheetName() === zayvkaSheet.getSheetName()){ // проверка на то, что изменение происходит именно на листе со списком заявок
    if (cell.getValue() === 'Выполнено'){
      zayvkaSheet.getRange(cell.getRow(), 1, 1, zayvkaSheet.getLastColumn()).copyTo(doSheet.getRange(doSheet.getLastRow() + 1, 1)); //перенос на другой лист
      zayvkaSheet.deleteRow(cell.getRow()); // удаление строки из листа
    }
  }
}

Add, save, run once through the script editor (it will ask permission to change the text in the table) and still
add data validation for the dropdowns

A
Alexander, 2020-10-08
@ForestAndGarden

  • Formula (see FILTER(); only it will not be a transfer, but a display / output).
  • An add-on for Google Spreadsheets (see Reactor).
  • Integration service (Zapier, Integromat, automate.io, etc.)
  • Google Apps Script.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question