CONVERT (unit conversion)

<< Click to Display Table of Contents >>

CONVERT (unit conversion)

Syntax:

CONVERT(Number, From, To)

Description:

Converts a Number between different measurement systems.

From and To are codes representing the source and the target unit (see table below).

Both units have to be in the same category. For example, you can convert meters to miles, but of course not to minutes.

A #N/A error value is displayed if a) From and To are not from the same category, or b) invalid unit codes.

Note: Unit codes are case-sensitive!

The following unit codes are available:

Mass

Code

Gram

g

Slug

sg

Pound* (avoirdupois)

lbm

u (atom mass)

u

Ounce (avoirdupois)

ozm

*Does not correspond to the pound still partly used in German-speaking countries (½ Kilo)

 

 

 

Distance

Code

Meter

m

Statute mile

mi

Nautical mile

Nmi

Inch

in

Foot

ft

Yard

yd

Ångström

ang

Pica

Pica

Light year*

ly

Parsec (parallax second)*

parsec

*These units are not supported by Microsoft Excel.

 

 

 

Time

Code

Second

sec

Minute

mn

Hour

hr

Day

day

Year**

yr

Fortnight*

ftn

*These units are not supported by Microsoft Excel.

 

** Based on a year with 365.25 days

 

 

 

Liquid measure

Code

Liter

l (lower case "L")

Teaspoon

tsp

Tablespoon

tbs

Fluid Ounce

oz

Cup

cup

Pint (U.S.)

pt

Pint (U.K.)

uk_pt

Quart

qt

Gallon

gal

 

 

Force

Code

Newton

N

Dyne

dyn

Pound-force

lbf

 

 

Power

Code

Watt

W

HP (Horsepower)

HP

 

 

Magnetism

Code

Tesla

T

Gauss

ga

 

 

Energy

Code

Joule

J

Erg

e

Thermodynamic calorie

c

IT calorie

cal

Electron volt

eV

Horsepower-hour

HPh

Watt-hour

Wh

Foot-pound force

flb

BTU (British Thermal Unit)

BTU

 

 

Pressure

Code

Pascal

Pa

Atmosphere

atm

mm of Mercury

mmHg

 

 

Temperature

Code

Degree Fahrenheit

F

Degree Celsius

C

Degree Kelvin

K

Additionally, prefixes can be added to metric units, "mg", for instance, stands for milligrams.

Please pay attention to the capitalization here as well!

The following prefixes are available:

Prefix (and factor)

Code

Exa (10^18)

E

Peta (10^15)

P

Tera (10^12)

T

Giga (10^9)

G

Mega (10^6)

M

Kilo (1000)

k

Hecto (100)

h

Deka (10)

e

Deci (0.1)

d

Centi (0.01)

c

Milli (0.001)

m

Micro (10^-6)

u

Nano (10^-9)

n

Pico (10^-12)

p

Femto (10^-15)

f

Atto (10^-18)

a

Example:

CONVERT(1, "day", "sec") returns 86400 (days ‑> seconds)

CONVERT(1, "mi", "km") returns 1.60934 (miles ‑> kilometers)

CONVERT(100, "kW", "HP") returns 134.10201 (100 kW ‑> HP)

CONVERT(1, "aparsec", "cm") returns 3.08568 (Attoparsec ‑> cm)