Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete break line between column A & B

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Delete break line between column A & B

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

--


Gary


wrote in message
ups.com...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? No Name Excel Worksheet Functions 7 October 7th 09 11:10 AM
Line break GARY Excel Discussion (Misc queries) 1 November 6th 07 12:00 AM
How do I delete a line at the edge of a column that's not formatte Vera Lemon Excel Discussion (Misc queries) 2 October 16th 06 09:19 PM
Break cell into multiple lines by line break Chia Excel Discussion (Misc queries) 1 August 20th 06 06:37 AM
Line break in X-axis column label? Ed Charts and Charting in Excel 2 April 24th 06 08:27 PM


All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"