![]() |
Leading the way in Microsoft Office Development |
| Home | | | Excel | | | Word | | | PowerPoint | | | Consultancy | | | Feedback | | | Contact |
| Excel > Functions > Text > RIGHT |
RIGHT(text [,num_chars]) |
| Returns the last or right most character (or characters) in a text string. |
| text | The text string that contains the characters you want to extract. | |
| num_chars | (Optional) The number of characters you want to extract. |
| REMARKS |
| If "text" is a text string then it must be enclosed in speech marks. | ||
| If "num_chars" > the length of the "text", then "text" is returned. | ||
| If "num_chars" is left blank, then 1 is used. | ||
| If "num_chars" is not numerical, then #VALUE! is returned. | ||
| If "num_chars" < 0, then #VALUE! is returned. | ||
| Any blank spaces are counted as individual characters. | ||
| If the text contains any leading or trailing spaces it may be worth using the TRIM() function to ensure you get the expected result. | ||
| There is also a RIGHTB() function which can be used with languages that use the double-byte character set. | ||
| Example 1 - | ||
| Example 2 - | ||
| Example 3 - | ||
| Example 4 - | ||
| Example 5 - | ||
| Example 6 - | ||
| Example 7 - | ||
| Example 8 - | ||
| Example 9 - | ||
| Example 10 - |
| EXAMPLES |
|
| Functions - R | Index - R | Text Manipulation | Office Online 2003 | Office Online 2007 |
| Copyright © 2010 Better Solutions Limited. All Rights Reserved. | Top |