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

100
Views
Script that highlights entire row after finding duplicate cells in column google

im trying to figure out how to make a button through script in google sheets thats going to be pressed on the cell that’s currently active, go through the entire column of cells to find a duplicate of the previous active cell, and then highlight the row that each duplicate cell is on. Any ideas?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

function myfunction() {
  const ss = SpreadsheetApp.getActive();
  const sh = ss.getActiveSheet();
  sh.getDataRange().setBackground("#ffffff");
  SpreadsheetApp.flush();
  const v = sh.getActiveRange().getValue();

  let lo = PropertiesService.getScriptProperties().getProperty('lastone');
  PropertiesService.getScriptProperties().setProperty('lastone', v);
  if (lo) {
    let tf = sh.createTextFinder(lo).matchEntireCell(true).findAll();
    tf.forEach(f => {
      sh.getRange(f.getRow(),1,1,sh.getLastColumn()).setBackground("#ffff00");
    });
  }
  SpreadsheetApp.flush();
}
about 4 years ago · Juan Pablo Isaza Report
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!