Difference between revisions of "Documentation/How Tos/Calc: CONCATENATE function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(→See also:) |
(Difference between REPT and CONCATENATE) |
||
Line 16: | Line 16: | ||
<tt>'''CONCATENATE(A1; A2)'''</tt> | <tt>'''CONCATENATE(A1; A2)'''</tt> | ||
: where cell A1 contains <tt>'''key'''</tt> and cell A2 contains <tt>'''board'''</tt> returns <tt>'''keyboard'''</tt>. | : where cell A1 contains <tt>'''key'''</tt> and cell A2 contains <tt>'''board'''</tt> returns <tt>'''keyboard'''</tt>. | ||
+ | |||
+ | <tt>'''CONCATENATE(ROUND(RAND()*10); ROUND(RAND()*10); ROUND(RAND()*10))'''</tt> | ||
+ | : returns <tt>'''xyz'''</tt> where <tt>'''x'''</tt>, <tt>'''y'''</tt>, <tt>'''z'''</tt> are three randomly independent digits, while: | ||
+ | :: <tt>'''REPT(ROUND(RAND()*10); 3)'''</tt> | ||
+ | : returns <tt>'''nnn'''</tt> where <tt>'''n'''</tt> is a random digit repeated three times. | ||
=== See also: === | === See also: === |
Revision as of 10:30, 9 December 2008
CONCATENATE
Combines several text strings into one string.
Syntax:
CONCATENATE(text1; text2; ... text30)
- returns up to 30 text strings text1 - text30, joined together.
- text1 - text30 may also be single cell references.
Example:
CONCATENATE("al"; "tog"; "ether")
- returns altogether.
CONCATENATE(A1; A2)
- where cell A1 contains key and cell A2 contains board returns keyboard.
CONCATENATE(ROUND(RAND()*10); ROUND(RAND()*10); ROUND(RAND()*10))
- returns xyz where x, y, z are three randomly independent digits, while:
- REPT(ROUND(RAND()*10); 3)
- returns nnn where n is a random digit repeated three times.
See also:
Functions listed alphabetically, Functions listed by category