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

248
Visualizações
How to copy all formulas from a row to another?

I'd like to create a new row and then copy all the formulas from the row below to this new row (with relative references, just as if I dragged the formulas manually). My purpose is to copy only the formulas, not the values. I mean, if there is no formula, only a value in the cell below, then the cell above (in the new row) shall be empty. I can have something like this:

spreadsheet.getRange('F3').activate();
  spreadsheet.getActiveRange().autoFill(spreadsheet.getRange('F2:F3'), SpreadsheetApp.AutoFillSeries.DEFAULT_SERIES);
  spreadsheet.getRange('H3').activate();
  spreadsheet.getActiveRange().autoFill(spreadsheet.getRange('H2:H3'), SpreadsheetApp.AutoFillSeries.DEFAULT_SERIES);
  spreadsheet.getRange('L3').activate();
  spreadsheet.getActiveRange().autoFill(spreadsheet.getRange('L2:L3'), SpreadsheetApp.AutoFillSeries.DEFAULT_SERIES);

(As formulas are F3, H3 and L3.)

But there I have to change the code every time I change something in the sheet. So I would need something that directly gets and sets all the formulas but only the formulas. Tried to check getFormulas() and setFormulas() but don't understand how it works.

about 4 years ago · Santiago Gelvez
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