Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

130
Visualizações
Can you run an onEdit function when a formula is in the cell causing it to check the box? I want to auto archive a row if a box is checked

The cells in column A are getting checked if another cell in column 11 is getting selected from a drop down list. I have a code that works right now if I am manually clicking the check box, but it will not work if the formula is applied to it. Below is my code that works if I am manually checking the checkbox in Column A. End Goal: I want to select a value from the drop down list in column 11 and it automatically put a check in the check box in column A and then my onEdit script recognize that the checkbox has been checked and it will auto archive that row.

function onEdit(event) {                        
// assumes source data in sheet named main                      
// target sheet of move to named Completed                      
// getColumn with check-boxes is currently set to column 1 or A                     
var ss = SpreadsheetApp.getActiveSpreadsheet();                     
var s = event.source.getActiveSheet();                      
var r = event.source.getActiveRange();                      
                        
if(s.getName() == "ACTIVITY REPORT" && r.getColumn() == 1 && r.getValue() == true) {                        
var row = r.getRow();                       
var numColumns = s.getLastColumn();                     
var targetSheet = ss.getSheetByName("Archive");                     
var target = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);                     
s.getRange(row, 1, 1, numColumns).moveTo(target);                       
s.deleteRow(row);                       
}                       
}                       
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda