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 8720421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:02:20+00:00 2026-06-13T07:02:20+00:00

I am trying to set the formula for a Google Spreadsheet cell using the

  • 0

I am trying to set the formula for a Google Spreadsheet cell using the cell.setFormula function.

This is my code from the function. The line of code of importance is the last one where I try to setFormula.

//Create new empty project sheet
function copySheet() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var temp = ss.getSheetByName("Project_Template");
  var name = Browser.inputBox("Create New Project", "Enter name for new project", Browser.Buttons.OK_CANCEL);
  if (name != "cancel") {
    ss.insertSheet(name,1, {template:temp})
    //Add project name to project code cell
    var newSheet = ss.getSheetByName(name);
    var cell = newSheet.getRange(3, 2);
    cell.setValue(name);
    //Update formula in placemarkers sheet
    var rowNum = ss.getNumSheets() - 3;
    var formulaSheet = ss.getSheetByName("Placemarkers");
    var formulaCell = formulaSheet.getRange(rowNum, 1);
    formulaCell.setFormula('=if(isna(filter('name'!AH3:AH3,'name'!AH3:AH3 <> ""))=true,"",filter('name'!AH3:AH3,'name'!AH3:AH3 <> ""))');
  }
}

When I try to save the script, I get the following error message:

Missing ) after argument list. (line 103)

I am sure it has to do with the combination of quotation and double quotation marks. I have not been able to get it working without an error message. Any help would be appreciated.

  • 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-13T07:02:21+00:00Added an answer on June 13, 2026 at 7:02 am

    The + operator is not inserted to join string and the name variable. The following code part fixes the problem

    formulaCell.setFormula('=if(isna(filter(' + name + '!AH3:AH3,' + name + '!AH3:AH3 <> ""))=true,"",filter(' + name + '!AH3:AH3,' + name + '!AH3:AH3 <> ""))');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using an example from MSDN I'm trying to set the value of a cell
I am trying to set the data validation for a range of cells using
I'm trying to add a formula to a cell that already references an external
I'm trying to set list validation for a cell based on the contents of
I am trying to fit a transformation from one set of coordinates to another.
I have this formula in a function below. It's a fairly simple concept, yet
Trying to set up caching on our datasets - we're using clr stored procedures
I am trying to set up a function that will calculate a score for
Im trying set the single table inheritance model type in a form. So i
Trying to set up a self signed certificate, for our intranet's web services site.

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.