Hi, I´m new to VBA and this forum and I´ve managed to get this macro to work for me. Until I added Russells extra bit of code to test for range first. I see it working away but it overwrites the results in cell F1.
The code I´m using is ...
VBA Code:
Sub combine_columns() Dim columnC As Variant Dim columnB As Variant Dim columnA As Variant
Range("A1").Select If ActiveCell.Offset(1, 0) <> "" Then Range(Selection, Selection.End(xlDown)).Select End If For Each columnA In Selection
Range("B1").Select If ActiveCell.Offset(1, 0) <> "" Then Range(Selection, Selection.End(xlDown)).Select End If For Each columnB In Selection
Range("C1").Select If ActiveCell.Offset(1, 0) <> "" Then Range(Selection, Selection.End(xlDown)).Select End If For Each columnC In Selection
Any help would be gratefully received although it will have to be spelled out for me as I´m definitely not a natural VBAer.
p.s. A very minor point is that if one column is left blank the macro still works but leaves a double space between the two terms. Impossible for me to solve.