Learn Excel Episode 587: Concatenate Range in VBA

Posted in Companies, Podcasts on July 11, 2008


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 & " "
Next vTemp
End Function

Watch Video Watch Video on External Site

Tags: Microsoft, Excel, MrExcel