Difference between revisions of "Manuals/calci/RIGHT"

From ZCubes Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
e.g. RIGHT("String",2) displays '''ng''' as a result.
 
e.g. RIGHT("String",2) displays '''ng''' as a result.
  
*RIGHT counts 1 byte per characters. RIGHT works with the languages that use 'Single Byte Character Set' (SBCS).
+
*RIGHT counts 1 byte per character. RIGHT works with the languages that use 'Single Byte Character Set' (SBCS).
 
*'''Text''' can be any string containing characters, numbers, symbols, blank spaces etc.
 
*'''Text''' can be any string containing characters, numbers, symbols, blank spaces etc.
 
*If argument '''Text''' is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
 
*If argument '''Text''' is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
Line 49: Line 49:
  
 
  =RIGHT(A1,5) : Displays last 5 characters in a string from cell A1. Displays '''-Come''' as the output.  
 
  =RIGHT(A1,5) : Displays last 5 characters in a string from cell A1. Displays '''-Come''' as the output.  
  =RIGHT(A2,8) : Displays last 8 characters in a string from cell A2. Displays '''HN SMITH''' as the output. Space Character is also counted.
+
  =RIGHT(A2,8) : Displays last 8 characters in a string from cell A2. Displays '''HN SMITH''' as the output. <br />Space Character is also counted.
 
  =RIGHT(A3,9) : Displays all characters in a string from cell A3. Displays '''123*123''' as the output.
 
  =RIGHT(A3,9) : Displays all characters in a string from cell A3. Displays '''123*123''' as the output.
 +
=RIGHTB(A3) : Displays last character in a string from cell A3. Displays '''3''' as the output.
 
  =RIGHT("Good Morning",7) :Displays '''Morning''' as the output.
 
  =RIGHT("Good Morning",7) :Displays '''Morning''' as the output.
 +
 +
==Related Videos==
 +
 +
{{#ev:youtube|cBk20ZZ6A9s|280|center|RIGHT}}
  
 
== See Also ==
 
== See Also ==

Latest revision as of 12:43, 13 May 2015

RIGHT(Text, Number_chars)

where,

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

RIGHT() displays the last character or characters from a text string, depending on the specified number of characters.

Description

RIGHT(txt)

e.g. RIGHT("String",2) displays ng as a result.

  • RIGHT counts 1 byte per character. RIGHT works with the languages that use 'Single Byte Character Set' (SBCS).
  • Text can be any string containing characters, numbers, symbols, blank spaces 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 all the text.
  • If Number_chars is omitted, Calci assumes it to be 1.

Examples

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

Wel-Come
JOHN SMITH
123*123
=RIGHT(A1,5) : Displays last 5 characters in a string from cell A1. Displays -Come as the output. 
=RIGHT(A2,8) : Displays last 8 characters in a string from cell A2. Displays HN SMITH as the output. 
Space Character is also counted. =RIGHT(A3,9) : Displays all characters in a string from cell A3. Displays 123*123 as the output. =RIGHTB(A3) : Displays last character in a string from cell A3. Displays 3 as the output. =RIGHT("Good Morning",7) :Displays Morning as the output.

Related Videos

RIGHT

See Also

References