Monday, July 27, 2009

One thing I've learned...

I'm going to try something new out. Each day I'm going to put out there something I've learned during the day (or at least recently). The only rule: it has to be technology related.

Today, was relative uneventful, so this is something I came across a few weeks ago. Excel has a built in CONVERT function. It's nothing revolutionary, but much handier (and way more accurate) than my attempts at doing conversions on my own (i.e. even though it works for in-the-head-calculations, you cannot get miles by multiplying kilometers by 3/5).

Where is the formula? If you have Excel 2007 it is available right out of the box. For Excel 2003 you must enable the Analysis toolpak add-in to see it.

So, here is how it works.
The formula takes 3 inputs:
  1. The number you want converted
  2. The current unit of measurement (using code found in help file)
  3. The desired unit of measurement (using code found in help file)

Here is are some of the conversions that can be done (with codes included in quotes - make sure to include the quotes).

Weight and mass
  • Gram "g"
  • Pound "lbm"
  • Ounces "ozm"

  • Meter "m"
  • Mile "mi"
  • Nautical mile "Nmi"
  • Inch "in"
  • Foot "ft"
  • Yard "yd"

  • Year "yr"
  • Day "day"
  • Hour "hr"
  • Minute "mn"
  • Second "sec"

  • Celsius "C"
  • Fahrenheit "F"
  • Kelvin "K"

  • Teaspoon "tsp"
  • Tablespoon "tbs"
  • Fluid ounce "oz"
  • Cup "cup"
  • Pint "us_pt" or for the UK pint "uk_pt"*
  • Quart "qt"
  • Gallon "gal"
  • Liter "l"

And the list goes on.

even better you can get down to many levels of metric measurement by adding an additional code and an underscore (_) to a unit. For example, centimeter is "c_m".

As an accountant, most of these conversions I never have use of. But there is a certain amount of coolness in the ability to calculate nautical miles so I can attempt to speak with pilots or boaters. And, while this might go without saying, you will get an error if you try to convert something that just doesn't make sense, like the time of day in to degrees farenheit for example.

*I had no idea that there were UK pints before writing this. And it is no surprise to me that the pints on the other side of the pond are bigger than their US equivalents.

No comments:

Post a Comment