Hello Timdp. I have experimented only with Google-Apps-Scripts applied to a Google-Sites before, but since in your case it is now a Google-Spreadsheet, I think I might be able to help. It would not be easy, since Google-Apps-Script is still new and is always changing; so just let me know if you'd prefer this to start on a dummy sheet first... Thanks, Hendra.