Friday, June 19, 2009

Sample Custom Function: Convert()

The URL Fetch service can be quite useful to create custom functions out of simple capabilities on other websites. Here's a sample custom function I wrote which will convert practically anything by using the conversion capability of Google Search in the background. So, for example:
=convert(100, "feet", "meters")
=convert(52, "weeks", "hours")
=convert(3, "tsp", "tbsp") (that's teaspoons to tablespoons!)

Those all work... as do many (many!) others...

The sample spreadsheet is here:

You can create your own copy of that to see the script code if you have Google Apps Script enabled on your domain.