Difference between revisions of "Documentation/How Tos/Calc: CONVERT ADD function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
Line 1: Line 1:
{{Documentation/MasterTOC
+
{{DISPLAYTITLE:CONVERT_ADD function}}
|bookid=1234'''
+
{{Documentation/CalcFunc MathematicalTOC
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div>
+
|ShowPrevNext=block
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Mathematical_functions|<div style="font-size: 140%;">Mathematical Functions]]
+
|PrevPage=Documentation/How_Tos/Calc:_CONVERT_function
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_COUNTBLANK_function
+
|NextPage=Documentation/How_Tos/Calc:_COUNTBLANK_function
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_CONVERT_function
+
}}__NOTOC__
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Logical_functions
+
|ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Number_Conversion_functions
+
|toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div>
+
  
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Trigonometric</div>
 
* [[Documentation/How_Tos/Calc:_COS_function|<div style="font-size: 120%;">Cos]]
 
* [[Documentation/How_Tos/Calc:_SIN_function|<div style="font-size: 120%;">Sin]]
 
* [[Documentation/How_Tos/Calc:_TAN_function|<div style="font-size: 120%;">Tan]]
 
* [[Documentation/How_Tos/Calc:_COT_function|<div style="font-size: 120%;">Cot]]
 
* [[Documentation/How_Tos/Calc:_ACOS_function|<div style="font-size: 120%;">Acos]]
 
* [[Documentation/How_Tos/Calc:_ACOT_function|<div style="font-size: 120%;">Acot]]
 
* [[Documentation/How_Tos/Calc:_ASIN_function|<div style="font-size: 120%;">Asin]]
 
* [[Documentation/How_Tos/Calc:_ATAN_function|<div style="font-size: 120%;">Atan]]
 
* [[Documentation/How_Tos/Calc:_ATAN2_function|<div style="font-size: 120%;">Atan2]]
 
* [[Documentation/How_Tos/Calc:_DEGREES_function|<div style="font-size: 120%;">Degrees]]
 
* [[Documentation/How_Tos/Calc:_RADIANS_function|<div style="font-size: 120%;">Radians]]
 
* [[Documentation/How_Tos/Calc:_PI_function|<div style="font-size: 120%;">Pi]]
 
 
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Hyperbolic</div>
 
* [[Documentation/How_Tos/Calc:_COSH_function|<div style="font-size: 120%;">Cosh]]
 
* [[Documentation/How_Tos/Calc:_SINH_function|<div style="font-size: 120%;">Sinh]]
 
* [[Documentation/How_Tos/Calc:_TANH_function|<div style="font-size: 120%;">Tanh]]
 
* [[Documentation/How_Tos/Calc:_COTH_function|<div style="font-size: 120%;">Coth]]
 
* [[Documentation/How_Tos/Calc:_ACOSH_function|<div style="font-size: 120%;">Acosh]]
 
* [[Documentation/How_Tos/Calc:_ACOTH_function|<div style="font-size: 120%;">Acoth]]
 
* [[Documentation/How_Tos/Calc:_ASINH_function|<div style="font-size: 120%;">Asinh]]
 
* [[Documentation/How_Tos/Calc:_ATANH_function|<div style="font-size: 120%;">Atanh]]
 
 
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Rounding and remainders</div>
 
* [[Documentation/How_Tos/Calc:_TRUNC_function|<div style="font-size: 120%;">Trunc]]
 
* [[Documentation/How_Tos/Calc:_ROUND_function|<div style="font-size: 120%;">Round]]
 
* [[Documentation/How_Tos/Calc:_ROUNDDOWN_function|<div style="font-size: 120%;">Rounddown]]
 
* [[Documentation/How_Tos/Calc:_ROUNDUP_function|<div style="font-size: 120%;">Roundup]]
 
* [[Documentation/How_Tos/Calc:_CEILING_function|<div style="font-size: 120%;">Ceiling]]
 
* [[Documentation/How_Tos/Calc:_FLOOR_function|<div style="font-size: 120%;">Floor]]
 
* [[Documentation/How_Tos/Calc:_EVEN_function|<div style="font-size: 120%;">Even]]
 
* [[Documentation/How_Tos/Calc:_ODD_function|<div style="font-size: 120%;">Odd]]
 
* [[Documentation/How_Tos/Calc:_MROUND_function|<div style="font-size: 120%;">Mround]]
 
* [[Documentation/How_Tos/Calc:_INT_function|<div style="font-size: 120%;">Int]]
 
* [[Documentation/How_Tos/Calc:_QUOTIENT_function|<div style="font-size: 120%;">Quotient]]
 
* [[Documentation/How_Tos/Calc:_MOD_function|<div style="font-size: 120%;">Mod]]
 
 
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Logarithm/Powers</div>
 
* [[Documentation/How_Tos/Calc:_EXP_function|<div style="font-size: 120%;">Exp]]
 
* [[Documentation/How_Tos/Calc:_POWER_function|<div style="font-size: 120%;">Power]]
 
* [[Documentation/How_Tos/Calc:_LOG_function|<div style="font-size: 120%;">Log]]
 
* [[Documentation/How_Tos/Calc:_LN_function|<div style="font-size: 120%;">Ln]]
 
* [[Documentation/How_Tos/Calc:_LOG10_function|<div style="font-size: 120%;">Log10]]
 
 
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Bessel functions</div>
 
* [[Documentation/How_Tos/Calc:_BESSELI_function|<div style="font-size: 120%;">Besseli]]
 
* [[Documentation/How_Tos/Calc:_BESSELJ_function|<div style="font-size: 120%;">Besselj]]
 
* [[Documentation/How_Tos/Calc:_BESSELK_function|<div style="font-size: 120%;">Besselk]]
 
* [[Documentation/How_Tos/Calc:_BESSELY_function|<div style="font-size: 120%;">Bessely]]
 
 
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Miscellaneous</div>
 
* [[Documentation/How_Tos/Calc:_ABS_function|<div style="font-size: 120%;">Abs]]
 
* [[Documentation/How_Tos/Calc:_COMBIN_function|<div style="font-size: 120%;">Combin]]
 
* [[Documentation/How_Tos/Calc:_COMBINA_function|<div style="font-size: 120%;">Combina]]
 
* [[Documentation/How_Tos/Calc:_CONVERT_function|<div style="font-size: 120%;">Convert]]
 
* [[Documentation/How_Tos/Calc:_CONVERT_ADD_function|<div style="font-size: 120%; border-style: double; border-color:#778899;">Convert Add]]
 
* [[Documentation/How_Tos/Calc:_COUNTBLANK_function|<div style="font-size: 120%;">Countblank]]
 
* [[Documentation/How_Tos/Calc:_COUNTIF_function|<div style="font-size: 120%;">Countif]]
 
* [[Documentation/How_Tos/Calc:_DELTA_function|<div style="font-size: 120%;">Delta]]
 
* [[Documentation/How_Tos/Calc:_ERF_function|<div style="font-size: 120%;">Erf]]
 
* [[Documentation/How_Tos/Calc:_ERFC_function|<div style="font-size: 120%;">Erfc]]
 
* [[Documentation/How_Tos/Calc:_FACT_function|<div style="font-size: 120%;">Fact]]
 
* [[Documentation/How_Tos/Calc:_FACTDOUBLE_function|<div style="font-size: 120%;">Factdouble]]
 
* [[Documentation/How_Tos/Calc:_GCD_function|<div style="font-size: 120%;">Gcd]]
 
* [[Documentation/How_Tos/Calc:_GCD_ADD_function|<div style="font-size: 120%;">Gcd Add]]
 
* [[Documentation/How_Tos/Calc:_GESTEP_function|<div style="font-size: 120%;">Gestep]]
 
* [[Documentation/How_Tos/Calc:_ISEVEN_function|<div style="font-size: 120%;">Iseven]]
 
* [[Documentation/How_Tos/Calc:_ISODD_function|<div style="font-size: 120%;">Isodd]]
 
* [[Documentation/How_Tos/Calc:_LCM_function|<div style="font-size: 120%;">Lcm]]
 
* [[Documentation/How_Tos/Calc:_LCM_ADD_function|<div style="font-size: 120%;">Lcm Add]]
 
* [[Documentation/How_Tos/Calc:_MULTINOMIAL_function|<div style="font-size: 120%;">Multinomial]]
 
* [[Documentation/How_Tos/Calc:_PRODUCT_function|<div style="font-size: 120%;">Product]]
 
* [[Documentation/How_Tos/Calc:_RAND_function|<div style="font-size: 120%;">Rand]]
 
* [[Documentation/How_Tos/Calc:_RANDBETWEEN_function|<div style="font-size: 120%;">Randbetween]]
 
* [[Documentation/How_Tos/Calc:_SERIESSUM_function|<div style="font-size: 120%;">Seriessum]]
 
* [[Documentation/How_Tos/Calc:_SIGN_function|<div style="font-size: 120%;">Sign]]
 
* [[Documentation/How_Tos/Calc:_SQRT_function|<div style="font-size: 120%;">Sqrt]]
 
* [[Documentation/How_Tos/Calc:_SQRTPI_function|<div style="font-size: 120%;">Sqrtpi]]
 
* [[Documentation/How_Tos/Calc:_SUBTOTAL_function|<div style="font-size: 120%;">Subtotal]]
 
* [[Documentation/How_Tos/Calc:_SUM_function|<div style="font-size: 120%;">Sum]]
 
* [[Documentation/How_Tos/Calc:_SUMIF_function|<div style="font-size: 120%;">Sumif]]
 
* [[Documentation/How_Tos/Calc:_SUMSQ_function|<div style="font-size: 120%;">Sumsq]]
 
}}__TOC__
 
 
== CONVERT_ADD ==
 
== CONVERT_ADD ==
 
Converts a number from one measurement system to another.
 
Converts a number from one measurement system to another.
Line 137: Line 50:
 
|}
 
|}
  
: The above units may be preceded by a decimal multiplier. For example <tt>'''k'''</tt> (<i>kilo</i>) is the prefix for 10<sup>3</sup> - so <tt>'''km'''</tt> means <i>kilometres</i>. 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 <tt>'''km2'''</tt> means <i>square kilometres</i>, that is <i>10<sup>6</sup> square metres</i>. The following table lists the prefixes:
+
: The above units may be preceded by a decimal multiplier. For example <tt>'''k'''</tt> (<i>kilo</i>) is the prefix for 10<sup>3</sup> - so <tt>'''km'''</tt> means <i>kilometers</i>. 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 <tt>'''km2'''</tt> means <i>square kilometers</i>, that is <i>10<sup>6</sup> square meters</i>. The following table lists the prefixes:
  
 
{| border="1" cellpadding="5" cellspacing="0" style="margin: 1em auto 1em auto"
 
{| border="1" cellpadding="5" cellspacing="0" style="margin: 1em auto 1em auto"
Line 151: Line 64:
  
 
<tt>'''CONVERT_ADD(10;"yd";"cm")'''</tt>
 
<tt>'''CONVERT_ADD(10;"yd";"cm")'''</tt>
: returns <tt>'''914.4'''</tt>, that is 10 yards expressed in centimetres.
+
: returns <tt>'''914.4'''</tt>, that is 10 yards expressed in centimeters.
  
 
=== Issues: ===
 
=== Issues: ===

Latest revision as of 15:11, 31 January 2024

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 103 - so km means kilometers. 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 kilometers, that is 106 square meters. 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 (101), h (102), k (103), M 106), G (109), T (1012), P (1015), E (1018), Z (1021), Y (1024)

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 centimeters.

Issues:

  • For historical reasons, many of the units do not use international standard abbreviations.
  • This function is not generally compatible with other spreadsheets.




See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_CONVERT_ADD_function&oldid=259884"
Views
Personal tools
Navigation
Tools
In other languages