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

249
Views
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
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!