Google Sheets: How to Write a Custom Function | a Tech-Recipes Tutorial

Google Sheets (spreadsheets) lets you write custom functions using JavaScript.  JavaScript is perhaps the world’s easiest programming language, and there are many examples on the internet, making it easy to copy. There are lots of reasons to write your own functions.  For example, you could convert a temperature reading from Celsius to Fahrenheit. You could make a cell change color if your budget shows a shortage.  You could program the commission you pay your employees based on the formula you use.  Some of these things you can do with the functions that are already in Google Sheets.  However, if you write your own function, then people who share documents with you can reference those and not have to recreate that logic. Here’s how to write a custom function in a Google Spreadsheet.

via Google Sheets: How to Write a Custom Function | a Tech-Recipes Tutorial.