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")
or
=convert(52, "weeks", "hours")
or
=convert(3, "tsp", "tbsp") (that's teaspoons to tablespoons!)

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

The sample spreadsheet is here:
http://spreadsheets.google.com/ccc?key=r7PRNG-DcO3Qk33l8cVgYCQ

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

2 comments:

  1. Would love to see but it keeps throwing me into my personal account and I only have scripts on my apps for my work where script is available.

    ReplyDelete