Functions Right() and Left()

Right()

This function is used to extract from a string (a text), an x number of characters starting from the right of the string.


Syntax:

= Right (String, Number of characters)


Example:

For the followig example function statements, let us assume that cell A1 contins the text - Excel Matic.
  • =Right(A1,1) - Result will be - 'E'
  • =Right(A1,2) - Result will be - 'Ex'
  • =Right(A1,5) - Result will be - 'Excel'
  • =Right(A1,6) - Result will be - 'Excel '
  • =Right(A1,8) - Result will be - 'Excel Ma'
  • =Right(A1,11) - Result will be - 'Excel Matic'
Note: In the above results I have used single quote marks ( ' ) to show how many characters have been extracted from the string. If you notice the result 4 has an extra space after l and before the ending single quote. This space has also been extracted from the string.



Left()

This function is used to extract from a string (a text), an x number of characters starting from the left of the string.


Syntax:

= Left (String, Number of characters)


Example:

For the followig example function statements, let us assume that cell A1 contins the text - Excel Matic.
  • =Left(A1,1) - Result will be - 'c'
  • =Left(A1,2) - Result will be - 'ic'
  • =Left(A1,5) - Result will be - 'Matic'
  • =Left(A1,6) - Result will be - ' Matic'
  • =Left(A1,8) - Result will be - 'el Matic'
  • =Left(A1,11) - Result will be - 'Excel Matic'

Note: In the above results I have used single quote marks ( ' ) to show how many characters have been extracted from the string. If you notice the result 4 has an extra space before M and after the starting single quote. This space has also been extracted from the string.
Share on Google Plus

About Dhakkanz

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Wednesday, May 27, 2009

Functions Right() and Left()

Right()

This function is used to extract from a string (a text), an x number of characters starting from the right of the string.


Syntax:

= Right (String, Number of characters)


Example:

For the followig example function statements, let us assume that cell A1 contins the text - Excel Matic.
  • =Right(A1,1) - Result will be - 'E'
  • =Right(A1,2) - Result will be - 'Ex'
  • =Right(A1,5) - Result will be - 'Excel'
  • =Right(A1,6) - Result will be - 'Excel '
  • =Right(A1,8) - Result will be - 'Excel Ma'
  • =Right(A1,11) - Result will be - 'Excel Matic'
Note: In the above results I have used single quote marks ( ' ) to show how many characters have been extracted from the string. If you notice the result 4 has an extra space after l and before the ending single quote. This space has also been extracted from the string.



Left()

This function is used to extract from a string (a text), an x number of characters starting from the left of the string.


Syntax:

= Left (String, Number of characters)


Example:

For the followig example function statements, let us assume that cell A1 contins the text - Excel Matic.
  • =Left(A1,1) - Result will be - 'c'
  • =Left(A1,2) - Result will be - 'ic'
  • =Left(A1,5) - Result will be - 'Matic'
  • =Left(A1,6) - Result will be - ' Matic'
  • =Left(A1,8) - Result will be - 'el Matic'
  • =Left(A1,11) - Result will be - 'Excel Matic'

Note: In the above results I have used single quote marks ( ' ) to show how many characters have been extracted from the string. If you notice the result 4 has an extra space before M and after the starting single quote. This space has also been extracted from the string.

Functions Right() and Left()SocialTwist Tell-a-Friend

0 comments:

Post a Comment