Export (0) Print
Expand All
Expand Minimize

WorksheetFunction.Convert Method

Office 2007
Converts a number from one measurement system to another. For example, Convert can translate a table of distances in miles to a table of distances in kilometers.

Syntax

expression.Convert(Arg1, Arg2, Arg3)

expression   A variable that represents a WorksheetFunction object.

Parameters

NameRequired/OptionalData TypeDescription
Arg1RequiredVariantThe value in from_units to convert.
Arg2RequiredVariantThe units for number.
Arg3RequiredVariantThe units for the result. Convert accepts the following text values (in quotation marks) for from_unit and to_unit which are listed in the Remarks section below.

Return Value
Double

Remarks

Weight and massFrom_unit or to_unit
Gram"g"
Slug"sg"
Pound mass (avoirdupois)"lbm"
U (atomic mass unit)"u"
Ounce mass (avoirdupois)"ozm"

DistanceFrom_unit or to_unit
Meter"m"
Statute mile"mi"
Nautical mile"Nmi"
Inch"in"
Foot"ft"
Yard"yd"
Angstrom"ang"
Pica (1/72 in.)"Pica"

TimeFrom_unit or to_unit
Year"yr"
Day"day"
Hour"hr"
Minute"mn"
Second"sec"

PressureFrom_unit or to_unit
Pascal"Pa" (or "p")
Atmosphere"atm" (or "at")
mm of Mercury"mmHg"

ForceFrom_unit or to_unit
Newton"N"
Dyne"dyn" (or "dy")
Pound force"lbf"

EnergyFrom_unit or to_unit
Joule"J"
Erg"e"
Thermodynamic calorie"c"
IT calorie"cal"
Electron volt"eV" (or "ev")
Horsepower-hour"HPh" (or "hh")
Watt-hour"Wh" (or "wh")
Foot-pound"flb"
BTU"BTU" (or "btu")

PowerFrom_unit or to_unit
Horsepower"HP" (or "h")
Watt"W" (or "w")

MagnetismFrom_unit or to_unit
Tesla"T"
Gauss"ga"

TemperatureFrom_unit or to_unit
Degree Celsius"C" (or "cel")
Degree Fahrenheit"F" (or "fah")
Kelvin"K" (or "kel")

Liquid measureFrom_unit or to_unit
Teaspoon"tsp"
Tablespoon"tbs"
Fluid ounce"oz"
Cup"cup"
U.S. pint"pt" (or "us_pt")
U.K. pint"uk_pt"
Quart"qt"
Gallon"gal"
Liter"l" (or "lt")

The following abbreviated unit prefixes can be prepended to any metric from_unit or to_unit.

PrefixMultiplierAbbreviation
exa1E+18"E"
peta1E+15"P"
tera1E+12"T"
giga1E+09"G"
mega1E+06"M"
kilo1E+03"k"
hecto1E+02"h"
dekao1E+01"e"
deci1E-01"d"
centi1E-02"c"
milli1E-03"m"
micro1E-06"u"
nano1E-09"n"
pico1E-12"p"
femto1E-15"f"
atto1E-18"a"
  • If the input data types are incorrect, Convert generates an error.
  • If the unit does not exist, Convert generates an error.
  • If the unit does not support an abbreviated unit prefix, Convert generates an error.
  • If the units are in different groups, Convert generates an error.
  • Unit names and prefixes are case-sensitive.



Community Additions

ADD
Show:
© 2014 Microsoft