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:

- The number you want converted
- The current unit of measurement (using code found in help file)
- 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"

Distance

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

Time

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

Temperature

- Celsius "C"
- Fahrenheit "F"
- Kelvin "K"

Liquid

- 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