Personal computing discussed

Moderators: SecretSquirrel, just brew it!

Darth Gerbil
Topic Author
Posts: 7509
Joined: Sat Apr 24, 2004 7:53 pm
Location: the abyss into which you gaze

Date-based functions in Google Docs

Mon Sep 05, 2011 7:49 pm

I have a spreadsheet in Google Docs that contains a list of students and the number of reward cards they each get. The school year is broken into quarters and I want to tally how many cards each student got in each of them. I feel like I want to make a conditional formula that says if the date is between so and so values, increment this cell's value by one every time cell X is incremented. This might be too difficult to be worth it, but I'm curious if it can be done. Any help is greatly appreciated!
Sheep Rustlers in the sky! <S> Slapt | <S> FUI | Air Warrior II/III
Minister of Gerbil Affairs
Posts: 2652
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)

Re: Date-based functions in Google Docs

Fri Sep 16, 2011 5:18 am

I'm no expert but you should be able to write a script to do the job. Docs scripts are written in javascript so are very easy to jump into if you already do a bit of web programming.

IIRC you can either make the script run when the sheet is opened or add a menu for the scripts functions to the main menu bar. I don't think there's a way to make the script automatically run when you update cells so it's not quite the same thing as a conditional formula.

The best way to get started is to have a play with the script gallery, there are plenty of examples to look at.

As I understand it you do run into issues when sharing a sheet that relies on scripts as the script isn't automatically shared. Don't quote me on this though... stuff changes very quickly on google apps and I don't really keep up with it.
Your mother ate my dog!

Who is online

Users browsing this forum: No registered users and 0 guests