What is the use of RIGHT function?

RIGHT Function in Excel returns the last or right most character(or Characters) in a text string.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

BROWSE ALL TEMPLATES

50+ Project Management Templates Pack
Excel PowerPoint Word

VIEW DETAILS

Advanced Project Plan & Portfolio Template
Excel Template

VIEW DETAILS

Ultimate Project Management Template
Excel Template

VIEW DETAILS

20+ Excel Project Management Pack
Excel Templates

VIEW DETAILS

20+ PowerPoint Project Management Pack
PowerPoint Templates

VIEW DETAILS

10+ MS Word Project Management Pack
Word Templates

VIEW DETAILS


 RIGHT Function in Excel -Use

What is the syntax of RIGHT function:

RIGHT(text,

[num_chars])

Where

text – Is the text string contains the characters you want to extract.
num_chars – Its optional argument.The number of characters you want to extract. If this parameter won’t declare, Only one character is returned.

RIGHT Function in Excel – Examples

 RIGHT Function in Excel example

  In the above examples, you can observe how RIGHT function will return the last character(S).

 Example 1: It will return last four characters from the text string.

Example 2: In this case blank also consider as single character and returns last ten characters from the text string.

Example 3: It will return last nine characters from the text string.

Example 4: If the number of characters is more than the length of string, then it will return original text string.

Example 5: The number of characters should be more than ‘Zero’ , Otherwise it will through error.

 Example 6: If number of characters left blank, Only one character is returned from right side of string.

VBA example on RIGHT function

RIGHT function is also available in VBA, following is the example code:

Dim sOutout As String
sOutout1 =RIGHT(“Analysis Tabs “, 4)

Output: “Tabs”

LIMITED TIME OFFER - Get it Now!
Advanced Project Plan Excel Template

 
Related Resource External VBA Reference