What is the syntax to split a string from the right?

Right(String, Length)
‘string – string to be searched; mandatory parameter
‘length – integer specifying the number of characters to be returned; mandatory parameter
'examples
Dim name As String
name = "Elon Gates"
MsgBox (Right(name, 5)) 'Gates
MsgBox (Right(name, 8)) 'on Gates
MsgBox (Right(name, 10)) 'Elon Gates

 

Advertisements