Skip to content

A custom 'convert' function for Google Spreadsheets that simplifies unit conversions. Supports currencies, length, volume, time, etc.

Notifications You must be signed in to change notification settings

gautamjain/gspreadsheet-convert-fn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

gspreadsheet-convert-fn

A custom 'convert' function for Google Docs/Spreadsheets that simplifies unit conversions. Supports currencies, length, volume, time, etc.

###Usage Use in a Google Spreadsheet the same way you enter any other formula into a cell.

=convert(quantity, from_unit, to_unit)

screenshot

###Examples

=convert(2, "gallons", "liters")
=convert(2, "gal", "L")

=convert(50, "USD", "INR")

=convert(3, "months", "days")

=convert(10, "ft", "yard")

Units can be specified in somewhat of a flexible format. Most abbreviations, unit-prefixes, and cases seem to work.

###How it Works This function works by querying www.google.com/ig/calculator and parsing the JSON response. The service was originally designed for iGoogle gadgets. Read more here.

I haven't tested out all the possible units that the service accepts, so if you're looking for a specific unit, it would be easiest to just try this script out.


Feel free to report bugs or make changes!

This function is similar to the 'convert' function in Microsoft Excel included in the Analaysis ToolPak.

About

A custom 'convert' function for Google Spreadsheets that simplifies unit conversions. Supports currencies, length, volume, time, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages