How do you use right function in VBA?
This example uses the Right function to return a specified number of characters from the right side of a string. Dim AnyString, MyStr AnyString = "Hello World" ' Define string. MyStr = Right(AnyString, 1) ' Returns "d". MyStr = Right(AnyString, 6) ' Returns " World".
How do you use right function in Excel?
=RIGHT(text,[num_chars])
The RIGHT function uses the following arguments: Text (required argument) – This is the original text string. Num_chars (optional argument) – Specifies the number of characters to be returned from the end of the given text.