PDA

View Full Version : [SOLVED] Combining Columns into One



Macro628
08-24-2016, 05:51 PM
Hello,

I'm trying to find a solution in which I can select multiple columns and it will combine into one column. I'm thinking that there maybe a vba code to do the trick but I can't get it to work fully I tried using Index function but I found that it wouldn't be dynamic enough when adding multiple columns. Any help with this would be appreciated! I also provide an sample in this post...

Thanks

mancubus
08-25-2016, 06:55 AM
combines columns A, C and E in column J
row 1 is not blank!!!! (delete this blank row in your sheet.)



Sub vbax_56958_combine_multi_cols_into_one()
With Worksheets("Online Word order")
.Range("A1").CurrentRegion.Offset(1).Copy Destination:=.Range("J" & .Rows.Count).End(xlUp).Offset(1)
.Range("C1").CurrentRegion.Offset(1).Copy Destination:=.Range("J" & .Rows.Count).End(xlUp).Offset(1)
.Range("E1").CurrentRegion.Offset(1).Copy Destination:=.Range("J" & .Rows.Count).End(xlUp).Offset(1)
End With
End Sub