How to concatenate strings in vba in Excel

What is the difference between + and & in terms of concatenation?

Answer:

from stackoverflow:com (see link here under)

& is always evaluated in a string context, while + may not concatenate if one of the operands is no string:
"1" + "2" => "12"
"1" + 2 => 3
1 + "2" => 3
"a" + 2 => type mismatch
This is simply a subtle source of potential bugs and therefore should be avoided. & always means "string concatenation", even if its arguments are non-strings:
"1" & "2" => "12"
"1" & 2 => "12"
1 & "2" => "12"
1 & 2 => "12"
"a" & 2 => "a2"

 Other excel answers

 

 

You can find similar Excel Questions and Answer hereunder

1) How can I clear cell after activating a routine when there is a change in value of a cell?

2) How can I get the count of number of series in a Chart using VBA?

3) How can I set up ListBox using VBA to allow users to select multiple values?

4) Determine if hyperlinks are valid in Excel

5) How can I loop through all ActiveX checkboxes in WorkSheet and set them to Unchecked status?

6) Here a explanation about the global seek function in VBA. Goal Seek is another tool under What If analysis that does a unique function as Scenario Manager.

7) How do I copy a Table from one location to another and retain all formulas, formats and columnwidths?

8) How to read a value from a cell in vba in Excel

9) How can I add a WorkSheet and name it as required using VBA?

10) I want a formula to concatenate multiple cell values separated by a line break.

 

Here the previous and next chapter