Difference between revisions of "Manuals/calci/LEFT"

From ZCubes Wiki
Jump to navigation Jump to search
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
=LEFT(Text, Number_chars)=
  
==Description==
+
where,
 +
*'''Text''' is a text string containing characters to extract,
 +
*'''Number_chars''' represents the number of characters to be extracted.
  
'''LEFT'''(Text, Number_chars)
+
LEFT() displays the specified number of characters from a text string.
  
where,
+
== Description ==
  
'''Text''' - is the text string to extract.
+
LEFT(Text, Number_chars)
  
'''Number_chars''' - represents the number of charcaters you want LEFT to extract.
+
e.g. LEFT("String",2) displays '''St''' as a result.
  
</div>
+
*LEFT counts 1 byte per character. LEFT works with the languages that use 'Single Byte Character Set' (SBCS).
----
+
*'''Text''' can be any string containing characters, numbers, symbols, blankspaces etc.
<div id="1SpaceContent" class="zcontent" align="left">
+
*If argument '''Text''' is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
 +
*Argument '''Number_chars''' indicates the number of characters to be displayed from a text string. '''Number_chars''' should be &gt;0.
 +
*If '''Number_chars''' &gt;'length of text', Calci displays the entire text.
 +
*If '''Number_chars''' is omitted, Calci assumes it to be 1.
  
LEFT retuns the charcater from text string, based on number of characters.
+
== Examples ==
  
</div>
+
Consider the following examples as input to LEFT() function.
----
 
<div id="7SpaceContent" class="zcontent" align="left">
 
  
If Number_chars &lt;= 0,LEFT returns #ERROR.
 
 
If Number_chars &gt; length of text, it returns all of text.
 
 
If Number_chars is omitted, it is considered as 1.
 
 
</div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
 
LEFT
 
 
</div></div>
 
----
 
<div id="8SpaceContent" class="zcontent" align="left">
 
 
Lets see an example in (Column1, Row2)
 
 
<nowiki>=LEFT(R1C1,2)</nowiki>
 
 
LEFT returns JO.
 
 
Lets see an another example in (Column1,Row3)
 
 
<nowiki>=LEFT(R1C1)</nowiki>
 
 
LEFT returns J(if omitted,considered as 1).
 
 
Consider an example in (Column1, Row4)
 
 
<nowiki>=LEFT(R1C1,20)</nowiki>
 
 
LEFT returns JOHN SMITH(Number_chars&gt; length of text).
 
 
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
 
<div id="2SpaceContent" class="zcontent" align="left">
 
<div id="2SpaceContent" class="zcontent" align="left">
  
 
{| id="TABLE3" class="SpreadSheet blue"
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class=" " |
+
| class="sshl_f" |Wel-Come
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class=" " | JOHN SMITH
 
| class="                                            " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | JO
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" |JOHN SMITH
| class="sshl_f" | J
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="even"
 
|- class="even"
| Row4
+
| class="sshl_f" |123*123
| class="sshl_f" | JOHN SMITH
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| class="sshl_f" |  
| class="  SelectTD ChangeBGColor SelectTD" |
 
<div id="2Space_Handle" class="zhandles" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" class="zhandles" title="Click and Drag over to AutoFill other cells."></div><div id="2Space_Drag" class="zhandles" title="Click and Drag to Move/Copy Area.">[[Image:copy-cube.gif]]  </div>
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class=" " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
=LEFT(A1,8) : Displays first 8 characters in a string from cell A1. Displays '''Wel-Come''' as the output.
----
+
=LEFT(A2,5) : Displays first 5 characters in a string from cell A2. Displays '''JOHN ''' as the output. Space Character is also counted.
 +
=LEFT(A2) : Displays first character '''J''' in a string from cell A2 as the output.
 +
=LEFT(A3,4) : Displays first 4 characters in a string from cell A3. Displays '''123*''' as the output.
 +
=LEFT("Good Morning",20) :Displays the full text string '''Good Morning''' as the output.
 +
 
 +
== Related Videos ==
 +
{{#ev:youtube|C_qfEZPbPSk|280|center|LEFT}}
 +
 
 +
== See Also ==
 +
 
 +
*[[Manuals/calci/LEFTB | LEFTB]]
 +
 
 +
== References ==
 +
 
 +
*[http://en.wikipedia.org/wiki/String_(computer_science) String]

Latest revision as of 15:19, 15 April 2015

LEFT(Text, Number_chars)

where,

  • Text is a text string containing characters to extract,
  • Number_chars represents the number of characters to be extracted.

LEFT() displays the specified number of characters from a text string.

Description

LEFT(Text, Number_chars)

e.g. LEFT("String",2) displays St as a result.

  • LEFT counts 1 byte per character. LEFT works with the languages that use 'Single Byte Character Set' (SBCS).
  • Text can be any string containing characters, numbers, symbols, blankspaces etc.
  • If argument Text is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
  • Argument Number_chars indicates the number of characters to be displayed from a text string. Number_chars should be >0.
  • If Number_chars >'length of text', Calci displays the entire text.
  • If Number_chars is omitted, Calci assumes it to be 1.

Examples

Consider the following examples as input to LEFT() function.

Wel-Come
JOHN SMITH
123*123
=LEFT(A1,8) : Displays first 8 characters in a string from cell A1. Displays Wel-Come as the output. 
=LEFT(A2,5) : Displays first 5 characters in a string from cell A2. Displays JOHN  as the output. Space Character is also counted.
=LEFT(A2) : Displays first character J in a string from cell A2 as the output.
=LEFT(A3,4) : Displays first 4 characters in a string from cell A3. Displays 123* as the output.
=LEFT("Good Morning",20) :Displays the full text string Good Morning as the output.

Related Videos

LEFT

See Also

References