Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9079845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:55:54+00:00 2026-06-16T19:55:54+00:00

I want to make a little script that copies all line values obtained by

  • 0

I want to make a little script that copies all line values obtained by a formula, to that same line without the formula.

I’m trying to use copyValuesToRange on the same line. (I would get the values calculated on a certain line and I would overlap them with those same values, fomula free).

A little contextualization… I’m doing a kind of record/pre-vision of values for a game. On the same sheet I have past records, the today’s record and values that are still to happen.

To obtain those values the sheet performs a few calculations per line but i want it only to calculate values that havent happened yet. So, each day, the sheet should perform an operation that clears the formulas from the previous day. For this i tried doing the following:

function example(oRow){

    var app = SpreadsheetApp.getActiveSpreadsheet();
    var sheetRecord = app.getSheetByName("Record");

    sheetRecord.getRange(oRow-1,1,1,18)
      .copyValuesToRange(sheetRecord,1,18,oRow-1,oRow-1);
}

oRow is the row number of the line that i want this operation to occur.

This is either doing nothing or still copying the formulas to the same cells.

I’m sure it’s some stupid litte thing that I’m missing, but i can’t put my finger on it.

How can i fix this? Or is there a simpler way to do this?
Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T19:55:55+00:00Added an answer on June 16, 2026 at 7:55 pm

    The arguments of the functions getRange() and copyValuesToRange() i showed above on the question are missplaced.

    The functionas are:

    getRange(row, column, optNumRows, optNumColumns)
    
    
    copyValuesToRange(sheet, startColumn, endColumn, startRow, endRow)
    

    So if I want to copy the values of the, for example, row 9 from column 1 to 15 (“A9:P9”) to that same row, i would have to do the following:

    sheetRecord.getRange(oRow-1,1,1,18).copyValuesToRange(sheetRecord,1,18,oRow-1,oRow-1);
    

    instead of what’s above on the question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a little desktop alert script that will tell me
I want to make a little script that, when pressed some specific key, for
I want to make a little script that make the mouse moves until the
I am trying to create a little php script that can make my life
I want to make a little script but I'm rather n00b in php so
I want to make a little php poll. The script should ask the users
I want to make a little tk app that continuous ping an ip and
I have a little test.sh script that I run from the command line ./test.sh
So I'm trying to make a little Matrix themed program, I want the user
I have a little php script that goes to mySql database. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.