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

101
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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