--> (Word) | --> (PDF) | --> (Epub) | --> (Text) |
--> (XML) | --> (OpenOffice) | --> (XPS) | |
SCENARIO
Column A has last name, Column B has first name. I want to joing data of 2 columns to show Firstname Lastname in ColumnA and then delete Column B.
SOLUTION (Using Formula)
You can do without code. Use the formula…
=A1 & " " & B1
in column C and copy down. Then copy the formula cells and do an edit, paste special values back over the formulas. Then delete columns A and B.
SOLUTION (Using VBA)
Right click your sheet tab, View code and paste this in and run it.
Sub sonic() lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row Set MyRange = Range("A1:A" & lastrow) For Each c In MyRange c.Value = c.Offset(, 1).Value & " " & c.Value Next Columns(2).ClearContents End Sub
SOURCE | LINK (Pcreview.co.uk) | LANGUAGE | ENGLISH |