Learn Excel Episode 587: Concatenate Range in VBA
Back in Episode 578, I used an incredibly complex method using NotePad for joining cells together. Today, Jonathan from the UK points out that a few lines of VBA code would have made the solution incredibly simple. Episode 587 shows you how.
Function ConcatenateRange(rCells As Range)
Dim vTemp As VariantApplication.VolatileFor
Each vTemp In rCells
ConcatenateRange = ConcatenateRange & vTemp & " "