VBA String OperatorThe string data is used to hold a sequence of characters that can consist of numbers, alphabets, special characters (symbols) or all of them. String operators are used to manipulating string data. A variable is said to be a string if it is enclosed within double quotes (""). SyntaxExamplesYou can concatenate the value of Mar-1997 from the first three letters of the month and the year like "Mar-1997". Here are some string operators such as: 1. Concatenate (&): This operator is used to concatenate the two strings or values together. For example, "Mary" & "Kom". Output: MaryKom Note: Concatenation operator can be used for the numbers as well as strings. The output depends on the context if the variables hold string value or a numeric value.
|