• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

combine columns of data vertically without losing original order

1001joec

New Member
How can I combine the two columns of data into one column without losing the original order? Column one takes precedence over column two and spaces must be omitted. The attached example shows what a combined column should look like.
 

Attachments

  • combine columns.xlsx
    8.6 KB · Views: 5
Hi 100joec

There are probably other ways but with VBA I would do this.

Code:
Sub shifto()
   Range("b3", Range("B" & Rows.Count).End(xlUp)).SpecialCells(2).Copy Range("H" & Rows.Count).End(xlUp)(2)
   Range("c3", Range("c" & Rows.Count).End(xlUp)).SpecialCells(2).Copy Range("H" & Rows.Count).End(xlUp)(2)
End Sub

Take care

Smallman
 
Example solution with array formula, pls find file attach.

Cheers
 

Attachments

  • combine columns.xlsx
    10.8 KB · Views: 8
Back
Top