Difference between revisions of "Documentation/How Tos/Calc: CONVERT ADD function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(added to table, see issue 110342, tested with Calc 3.2 (DEV300_m62)) |
m |
||
Line 73: | Line 73: | ||
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||
− | [[Category: Documentation/Reference/Calc]] | + | [[Category: Documentation/Reference/Calc/Mathematical functions]] |
Revision as of 07:54, 3 May 2010
CONVERT_ADD
Converts a number from one measurement system to another.
This function is only available if the Analysis AddIn is installed.
Syntax:
CONVERT_ADD(number; originalunits; newunits)
- number is the number to be converted.
- originalunits and newunits are text representing the original and new measurement systems. These are case-sensitive, and must be selected from the table below. Units in bold accept an optional prefix as a decimal multiplier from the table below that.
property | units |
Weight | g, sg, lbm, u, ozm, stone, ton, grain, pweight, hweight, shweight, brton |
length | m, mi, Nmi, in, ft, yd, ang, Pica, ell, parsec, lightyear, survey_mi |
time | yr, day, hr, mn, sec, s |
pressure | Pa, atm, at, mmHg, Torr, psi |
force | N, dyn, dy, lbf, pond |
energy | J, e, c, cal, eV, ev, HPh, Wh, wh, flb, BTU, btu |
power | W, w, HP, PS |
field strength | T, ga |
temperature | C, F, K, kel, Reau, Rank |
volume | l, L, lt, tsp, tbs, oz, cup, pt, us_pt, qt, gal, m3, mi3, Nmi3, in3, ft3, yd3, ang3, Pica3,
barrel, bushel, regton, Schooner, Middy, Glass |
area | m2, mi2, Nmi2, in2, ft2, yd2, ang2, Pica2, Morgen, ar, acre, ha |
speed | m/s, m/sec, m/h, mph, kn, admkn |
information | bit, byte |
- The above units may be preceded by a decimal multiplier. For example k (kilo) is the prefix for 10^{3} - so km means kilometres. If the unit is a measure of area the multiplier is squared, and if it is a measure of volume the multiplier is cubed. For example km2 means square kilometres, that is 10^{6} square metres. The following table lists the prefixes:
prefix < 1 | y (10^{-24}), z (10^{-21}), a (10^{-18}), f (10^{-15}), p (10^{-12}), n (10^{-9}), u (10^{-6}), m (10^{-3}), c (10^{-2}), d (10^{-1}) |
prefix > 1 | e (10^{1}), h (10^{2}), k (10^{3}), M 10^{6}), G (10^{9}), T (10^{12}), P (10^{15}), E (10^{18}), Z (10^{21}), Y (10^{24}) |
Example:
CONVERT_ADD(120;"in";"ft")
- returns 10, the number of feet in 120 inches.
CONVERT_ADD(10;"yd";"cm")
- returns 914.4, that is 10 yards expressed in centimetres.
Issues:
- For historical reasons, many of the units do not use international standard abbreviations.
- This function is not generally compatible with other spreadsheets.