[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
CONVERT ( number , from-unit , to-unit )
Description: Converts a number from one measurement system to another.
Arguments:
Name |
Type |
Description |
number |
number |
The value to be converted from from-units to to-units. |
from-unit |
The unit to be converted from, where the valid string values are shown in the tables below. | |
to-unit |
The unit to be converted to, where the valid string values are shown in the tables below. |
Weight and Mass | |
Unit String |
Meaning |
g |
Gram |
lbm |
Pound mass (avoirdupois) |
ozm |
Ounce mass (avoirdupois) |
sg |
Slug |
U (atomic mass unit) |
Distance | |
Unit String |
Meaning |
ang |
Angstrom |
ft |
Foot |
in |
Inch |
Meter | |
mi |
Statute mile |
Nmi |
Nautical mile |
Pica |
Pica (1/72 inch) |
yd |
Yard |
Time | |
Unit String |
Meaning |
day |
Day |
hr |
Hour |
mn |
Minute |
sec |
Second |
yr |
Year |
Pressure | |
Unit String |
Meaning |
at or atm |
Atmosphere |
mmHg |
mm of Mercury |
P or p |
Pascal |
Force | |
Unit String |
Meaning |
dy or dyn |
Dyne |
lbf |
Pound force |
Newton |
Energy | |
Unit String |
Meaning |
BTU or btu |
BTU |
Thermodynamic calorie | |
cal |
IT calorie |
Erg | |
ev or eV |
Electron volt |
flb |
Foot-pound |
HPh or hh |
Horsepower-hour |
J |
Joule |
Wh or wh |
Watt-hour |
Power | |
Unit String |
Meaning |
H or hp |
Horsepower |
W or w |
Watt |
Magnetism | |
Unit String |
Meaning |
ga |
Gauss |
Tesla |
Temperature | |
Unit String |
Meaning |
C or cel |
Degrees Celsius |
F or fah |
Degrees Fahrenheit |
K or kel |
Degrees Kelvin |
Liquid Measure | |
Unit String |
Meaning |
cup |
Cup |
gal |
U.S. Gallon |
l or lt |
Liter |
oz |
Fluid ounce |
ptor us_pt |
U.S. pint |
qt |
U.S. Quart |
tbs |
Tablespoon |
tsp |
Teaspoon |
uk_pt |
U.K. pint |
The following abbreviated unit prefixes can be used with any metric unit:
Abbreviated Unit Prefixes | |
Prefix String |
Meaning |
E |
exa (1E+18) |
P |
peta (1E+15) |
tera (1E+12) | |
G |
giga (1E+09) |
M |
mega (1E+06) |
kilo (1E+03) | |
h |
hecto (1E+02) |
dekao (1E+01) | |
deci (1E-01) | |
centi (1E-02) | |
milli (1E-03) | |
micro (1E-06) | |
nano 1E-09) | |
pico (1E-12) | |
femto (1E-15) | |
a |
atto (1E-18) |
Unit names and prefixes are case-sensitive.
Return Type and Value: number – The value of number in from-units converted to to-units.
However, if
• The value of from-unit or to-unit is invalid, #N/A is returned.
• The from-unit and to-unit are from different measurement categories, #N/A is returned.
• The value of from-unit or to-unit has an abbreviated unit prefix, yet none is supported for that unit, #N/A is returned.
[Example:
CONVERT(10,"ozm","g") results in 283.4951521
CONVERT(1,"yd","mm") results in 914.4000003
CONVERT(1,"yd","cm") results in 91.44000003
CONVERT(1,"yd","m") results in 0.9144
CONVERT(1,"yd","km") results in 0.0009144
CONVERT(1,"mi","Nmi") results in 0.868976242
CONVERT(1,"day","sec") results in 86400
CONVERT(0,"K","C") results in -273.15
end example]