Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Google Spreadsheet

The above link is a picture of the Google Docs spreadsheet that I am working on. Basically it is a sale ticket for a small appliance parts store.

I need to be able to select a range of rows and have them moved to another sheet.

If there is ever an "X" in column H, I need the script to copy the sale ticket and move it to another sheet. How do can I tell the script how big of a range to copy? The number of rows will vary depending on how many items are on the sale ticket. Most likely anywhere between 11-15 rows.

I'm not sure how to accomplish this in Javascript. Any help would be very very appreciated.

Edit, one idea is to have have it so when it detects an "x" in column H, it counts down the column until it finds the words "Amount Due". I just don't know how to implement this.

share|improve this question
why do you create a database application in a spreadsheet? – edelwater Nov 21 '10 at 19:29
It's much better than what we currently have. Do you think you could help me with the script? – David Nov 21 '10 at 20:19
no. alternative, click demo here: phppointofsale.com (it is free software written in php) – edelwater Nov 22 '10 at 0:35

You can do this using Google Apps Script, which is a new JavaScript-based scripting language developed for Google Apps. According to this description from Google, you can create custom spreadsheet functions.

Google Apps Script is a JavaScript cloud scripting language that provides easy ways to automate tasks across Google products and third party services.

With Google Apps Script you can:

  • Automate repetitive business processes (e.g. expense approvals, time-sheet tracking, ticket management, order fulfillment, and much more)
  • Create custom spreadsheet functions

While I can't provide you with the syntax needed to solve your problem, I am pretty sure GOogle Apps Script can work for you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.