Contingut

# CONVERT function

Converteix un valor d'una unitat de mesura al valor corresponent en una altra unitat de mesura. Introduïu les unitats de mesura directament com a text entre cometes o com a referència. Les unitats de mesura especificades a través dels arguments han de coincidir amb els símbols d'unitat admesos, que distingeixen entre majúscules i minúscules. Per exemple, el símbol de la unitat «newton» és la «N» majúscula.

The measurement units recognized by CONVERT fall into 13 groups, which are listed below. CONVERT will perform conversions between any two units within one group but reject any request to convert between units in different groups.

You can also add binary and decimal prefixes to units of measurement that support them. The list of all prefixes and their corresponding multipliers are shown below.

Potser aquesta funció no sigui compatible amb altres programes de full de càlcul.

### Sintaxi

CONVERT(Number; FromUnit; ToUnit)

Nombre és el nombre que s'ha de convertir.

DesDUnitat és la unitat des de la qual es fa la conversió.

AUnitat és la unitat a la qual es fa la conversió. Ambdues unitats han de ser del mateix tipus.

If FromUnit and ToUnit are not valid units from the same group, then CONVERT reports an invalid argument error (Err:502).

### Exemples

=CONVERT(-10; "C"; "F")

Here the function converts -10 degrees Celsius to degrees Fahrenheit, returning the value 14. There is not a simple multiplicative relationship between temperature units, as different reference points are used. Hence, as in this case, an input negative number may be converted to a positive value.

=CONVERT(3.5; "mi"; "yd")

Here the function converts 3.5 international miles to yards, returning the value 6160. Both units are in the Length and distance group.

=CONVERT(256; "Gibit"; "Mibyte")

Here the function converts 256 gigibits to mebibytes, returning the value 32768. Both units (bit and byte) are in the Information group and support binary prefixes.

=CONVERT(1; "dyn"; "e")

Here the function returns an invalid argument error (Err:502) because the two units (dyne and erg) are in different groups (Force and Energy respectively).

## Units of measurement

Below are the unit measurement groups supported by the CONVERT function. Be aware that conversions can only happen between units that belong to the same group.

The column Prefix indicates whether or not a given unit of measurement supports prefixes.

### Àrea

Some measurement units have more than one accepted symbol. The accepted unit symbols are separated by semicolons in the Unit symbol column.

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"ang2" ; "ang^2" | Square angstrom | Sí
"ar" | Are | Sí
"ft2" ; "ft^2" | Square foot | No
"ha" | Hectare | No
"in2" ; "in^2" | Square inch | No
"ly2" ; "ly^2" | Square light-year | No
"m2" ; "m^2" | Square meter | Sí
"mi2" ; "mi^2" | Square international mile | No
"Morgen" | Morgen | No
"Nmi2" ; "Nmi^2" | Square nautical mile | No
"Pica2" ; "Pica^2" ; "picapt2" ; "picapt^2" | Square pica point | No
"pica2" ; "pica^2" | Square pica | No
"uk_acre" ; "acre" | International acre | No
"us_acre" | US survey acre | No
"yd2" ; "yd^2" | Square yard | No

### Energia

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"BTU" ; "btu" | British thermal unit | No
"c" | Thermochemical calorie | Sí
"cal" | International Steam Table calorie | Sí
"e" | erg | Sí
"eV" ; "ev" | Electron volt | Sí
"flb" | Foot-pound | No
"HPh" ; "hh" | Horsepower-hour | No
"J" | Joule | Sí
"Wh" ; "wh" | Watt-hour | Sí

### Flux density

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"ga" | Gauss | Sí
"T" | Tesla | Sí

### Força

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"dyn" ; "dy" | Dyne | Sí
"N" | Newton | Sí
"lbf" | Pound-force | No
"pond" | Pond | Sí

### Informació

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"bit" | Bit | Sí
"byte" | Byte | Sí

### Longitud i distància

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"ang" | Angstrom | Sí
"ell" | Alna | No
"ft" | Peu | No
"in" | Polzada | No
"ly" ; "lightyear" | Any de llum | Sí
"m" | Metre | Sí
"mi" | Milla internacional | No
"Nmi" | Milla nàutica | No
"parsec" ; "pc" | Parsec | Sí
"Pica" ; "picapt" | Pica point | No
"pica" | Pica | No
"survey_mi" | US survey mile | No
"yd" | Yard | No

### Massa i pes

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"cwt" ; "shweight" | Short hundredweight | No
"g" | Gram | Sí
"grain" | Gra | No
"lbm" | Lliura | No
"ozm" | Unça | No
"pweight" | Pennyweight | No
"sg" | Slug | No
"stone" | Pedra | No
"ton" | Short ton | No
"u" | Unitat de massa atòmica unificada | Sí
"uk_cwt" ; "lcwt" ; "hweight" | Long hundredweight | No
"uk_ton" ; "LTON" ; "brton" | Long ton | No

### Potència

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"HP" ; "h" | Mechanical horsepower | No
"PS" | Pferdestärke or metric horsepower | No
"W" ; "w" | Vat | Sí

### Pressió

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"atm" ; ("at")(1) | Atmosfera estàndard | Sí
"mmHg" | Mil·límetre de mercuri | Sí
"Pa" | Pascal | Sí
"psi" | Pound per square inch | No
"Torr" | Torr | No

1 - The "at" unit is deprecated. Use "atm" instead.

### Velocitat

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"admkn" | Nus de l'Almirallat | No
"kn" | Nus internacional | No
"m/h" ; "m/hr" | Metres per hora | Sí
"m/s" ; "m/sec" | Metres per segon | Sí
"mph" | Milles per hora | No

### Temperatura

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"C" ; "cel" | Grau Celsius | No
"F" ; "fah" | Grau Fahrenheit | No
"K" ; "kel" | Kelvin | Sí
"Rank" | Grau Rankine | No
"Reau" | Grau Réaumur | No

### Temps

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"day" ; "d" | Dia | No
"hr" | Hora | No
"mn" ; "min" | Minut | No
"sec" ; "s" | Segon | Sí
"yr" | Any | No

### Volum

Símbol de la unitat | Descripció | Prefix
--- | --- | ---
"ang3" ; "ang^3" | Cubic angstrom | Sí
"barrel" | Barril de petroli | No
"bushel" | US bushel | No
"cup" | US cup | No
"ft3" ; "ft^3" | Peu cúbic | No
"gal" | US gallon | No
"Glass"(2) | Australian glass (200 milliliters) | No
"GRT" ; "regton" | Tonatge d'arqueig brut | No
"Humpen"(2) | Humpen (500 milliliters) | No
"in3" ; "in^3" | Polzada cúbica | No
"l" ; "L" ; "lt" | Litre | Sí
"ly3" ; "ly^3" | Any de llum cúbic | No
"m3" ; "m^3" | Metre cúbic | Sí
"mi3" ; "mi^3" | Milla internacional cúbica | No
"Middy"(2) | Australian middy (285 milliliters) | No
"MTON" | Measurement ton | No
"Nmi3" ; "Nmi^3" | Cubic nautical mile | No
"oz" | US fluid ounce | No
"Pica3" ; "Pica^3" ; "picapt3" ; "picapt^3" | Cubic pica point | No
"pica3" ; "pica^3" | Cubic pica | No
"pt" ; "us_pt" | US pint | No
"qt" | US quart | No
"Schooner"(2) | Australian schooner (425 milliliters) | No
"Sixpack"(2) | Paquet de sis (2 litres) | No
"tbs" | US tablespoon | No
"tsp" | US teaspoon | No
"tspm" | Metric teaspoon | No
"uk_gal" | Imperial gallon | No
"uk_pt" | Imperial pint | No
"uk_qt" | Imperial quart | No
"yd3" ; "yd^3" | Cubic yard | No

2 - These units are not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard for the CONVERT function. They are preserved for backward compatibility.

## Prefixos

### Prefixos decimals

Prefix | Multiplicador
--- | ---
Y (yotta) | 1024
Z (zetta) | 1021
E (exa) | 1018
P (peta) | 1015
T (tera) | 1012
G (giga) | 109
M (mega) | 106
k (kilo) | 103
h (hecto) | 102
e (deca) | 101
d (deci) | 10-1
c (centi) | 10-2
m (milli) | 10-3
u (micro) | 10-6
n (nano) | 10-9
p (pico) | 10-12
f (femto) | 10-15
a (atto) | 10-18
z (zepto) | 10-21
y (yocto) | 10-24

### Prefixos binaris

Prefix | Multiplicador
--- | ---
Yi (yobi) | 280
Zi (zebi) | 270
Ei (exbi) | 260
Pi (pebi) | 250
Ti (tebi) | 240
Gi (gibi) | 230
Mi (mebi) | 220
ki (kibi) | 210

#### Informació tècnica

This function is NOT part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

ORG.OPENOFFICE.CONVERT

Temes relacionats

CONVERT Wiki page