Delete break line between column A & B

  • Thread starter Thread starter tom.greenan
  • Start date Start date
T

tom.greenan

I have the first name in column A and the last name in Column B and I
want to take out the line between the two columns and put the first
and last names in the same field. Your input is appreciated.
 
here's one way, assuming the data starts in A2

Sub join_names()
Dim ws As Worksheet
Dim lastrow As Long
Dim i As Long
Set ws = Worksheets("Sheet1")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lastrow
With Range("A" & i)
.Value = .Value & " " & .Offset(, 1).Value
End With
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top