Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!