Skip to content

Use a shared Apps Script file

The .gs file carries the code your colleague chose to share. Keep the original and open a working copy in a text editor. If you only received a link to a private generation, ask the sender for the file.

Find where the script runs

Look at the function names and the sender’s instructions. A Sheets formula marked @customfunction belongs in the destination spreadsheet’s script project. A function such as onEdit(e) receives its input when you edit a cell. Keep any sending, deletion or scheduled steps out of your first rehearsal.

Try one change in a blank Sheet

Use the registration desk example if you want a small file to practice with. It splits a booth code into two cells and keeps the leading zeros.

  1. Download BOOTHCODE.gs. Open a blank Sheet, choose Extensions → Apps Script, paste the file into the editor and save.
  2. Type West-007 in A2 and =BOOTHCODE(A2) in B2. Leave C2 empty so the result can fill both cells. You should see West and 007.
  3. In the editor, change the words Check code to Ask the desk and save. Change A2 to West. B2 now reads Ask the desk. The file you downloaded still contains the original message.

Troubleshoot a blocked Sheets result

Describe a new automation in Gnaw