I have completed several projects with Google scripting, including Calendar and Spreadsheets. I can send you an example of my script, if you need. As for your task, I need only debug the script to check the issue and solve it, if possible. (I hope, it is possible, but I need additional data)