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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:30:37+00:00 2026-06-08T10:30:37+00:00

I have written a simple Google Apps Spreadsheet script that takes details in some

  • 0

I have written a simple Google Apps Spreadsheet script that takes details in some rows and converts them to a single list; all quite straightforward. The issue is that the script keeps stopping at random points, and the loop never finishes – there is no error message, and the message at the top of the script editor still indicates it is running, when it has clearly stopped.

I initially thought maybe it was being throttled somehow, but the random stopping points (sometimes at source sheet row 6x, sometimes at 7x, sometimes well into the hundreds) and the lack of an error message suggests otherwise.

Can anyone assist me in working out why this is happening? Is it because I am running it from the script editor window? Are there any other reasons (network issues, maybe) that an apps script could stop running, and if so, can it be run in background or similar to prevent this?

Thanks!

function convertTrimsToList(){
  var ss = SpreadsheetApp.openById("[REDACTED]");
  var sheet = ss.getSheets()[0];
  var newss = SpreadsheetApp.create("MMT List");
  var newsheet = newss.getSheets()[0];

x = 1; z = 1; i = 1; q = 1; while (sheet.getRange(x,1).getValue() != "") { sheet.getRange(1,6).setValue("Processing row " + x); y = 5; while (sheet.getRange(x,y).getValue() != "") { sheet.getRange(1,7).setValue("Processing row " + y); if (x != 1) { if (y == 5 && sheet.getRange(x,1).getValue() != sheet.getRange((x-1),1).getValue()) { i++ } } newsheet.getRange(z,1).setValue(i); newsheet.getRange(z,2).setValue(q); newsheet.getRange(z,3).setValue(sheet.getRange(x,y).getValue()); z++ y++ } if (x != 1) { if (sheet.getRange(x,3).getValue() != sheet.getRange((x-1),3).getValue()) { q++ } } else { q++ } x++ } }

  • 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-08T10:30:43+00:00Added an answer on June 8, 2026 at 10:30 am

    It turns out that this is the same issue that was happening here: Exceeded maximum execution time in Google Apps Script – not sure why I didn’t get an error message, but it seems to be the same problem, so I have refactored my code to rectify it.

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

Sidebar

Related Questions

I noticed that many websites, even Google and some banking sites, have poorly-written HTML
I have written a simple program that use some classes and procol buffers. These
I have a simple program (written in Java) which uses the google protocol buffer
I have written a simple automation script for deploying and restarting my twisted application
I have written a simple WCF service that accepts and stores messages. It works
I have written a simple perl script to read a line from a .csv
I have a simple web form written in Google web toolkit. I want the
I have written simple code to get content from xml file to php. $xml
I have written a simple memory game. You click on one of 16 cards
I have written a simple web Application which is running(on Tomcat Server) fine on

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.