ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Text Combining Col A and Col B to Col A (https://www.excelbanter.com/excel-programming/399308-text-combining-col-col-b-col.html)

Steved

Text Combining Col A and Col B to Col A
 
Hello from Steve Dee

In column A I have Smith
In Column B I Have Brian

Can I add text from Col B to Col A to have Smith Brian

Thankyou.


John

Text Combining Col A and Col B to Col A
 
try =A1&" "&B1 in C1 and fill down
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"Steved" wrote:

Hello from Steve Dee

In column A I have Smith
In Column B I Have Brian

Can I add text from Col B to Col A to have Smith Brian

Thankyou.


Steved

Text Combining Col A and Col B to Col A
 
Hello from Steved

My objective is to Combine Col A and Col B into Col A

Thankyou.

"John" wrote:

try =A1&" "&B1 in C1 and fill down
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"Steved" wrote:

Hello from Steve Dee

In column A I have Smith
In Column B I Have Brian

Can I add text from Col B to Col A to have Smith Brian

Thankyou.


Mike

Text Combining Col A and Col B to Col A
 
The only way to do this is with VBA Something like this should work

Sub trythis()
Dim lastcell As Long
Dim i As Long
lastcell = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lastcell
'combine Column A and B
Range("A" & i).Value = Range("A" & i).Value & "," & _
Range("A" & i).Offset(0, 1).Value
'clear column B value
Range("A" & i).Offset(0, 1).Value = ""
Next
End Sub

"Steved" wrote:

Hello from Steved

My objective is to Combine Col A and Col B into Col A

Thankyou.

"John" wrote:

try =A1&" "&B1 in C1 and fill down
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"Steved" wrote:

Hello from Steve Dee

In column A I have Smith
In Column B I Have Brian

Can I add text from Col B to Col A to have Smith Brian

Thankyou.


Don Guillett

Text Combining Col A and Col B to Col A
 
try this idea

Sub combinecolumns()
lr = Cells(Rows.Count, "i").End(xlUp).Row
For Each c In Range("i2:i" & lr)
c.Value = c & ", " & c.Offset(, 1)
Next c
Range("j2:j" & lr).ClearContents
'or columns("J").delete
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steved" wrote in message
...
Hello from Steve Dee

In column A I have Smith
In Column B I Have Brian

Can I add text from Col B to Col A to have Smith Brian

Thankyou.



Steved

Text Combining Col A and Col B to Col A
 
Hello Mike

Exactly What I required

Thankyou

Steved

"Mike" wrote:

The only way to do this is with VBA Something like this should work

Sub trythis()
Dim lastcell As Long
Dim i As Long
lastcell = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lastcell
'combine Column A and B
Range("A" & i).Value = Range("A" & i).Value & "," & _
Range("A" & i).Offset(0, 1).Value
'clear column B value
Range("A" & i).Offset(0, 1).Value = ""
Next
End Sub

"Steved" wrote:

Hello from Steved

My objective is to Combine Col A and Col B into Col A

Thankyou.

"John" wrote:

try =A1&" "&B1 in C1 and fill down
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"Steved" wrote:

Hello from Steve Dee

In column A I have Smith
In Column B I Have Brian

Can I add text from Col B to Col A to have Smith Brian

Thankyou.


Steved

Text Combining Col A and Col B to Col A
 
Hello Don

Thankyou

Steved

"Don Guillett" wrote:

try this idea

Sub combinecolumns()
lr = Cells(Rows.Count, "i").End(xlUp).Row
For Each c In Range("i2:i" & lr)
c.Value = c & ", " & c.Offset(, 1)
Next c
Range("j2:j" & lr).ClearContents
'or columns("J").delete
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steved" wrote in message
...
Hello from Steve Dee

In column A I have Smith
In Column B I Have Brian

Can I add text from Col B to Col A to have Smith Brian

Thankyou.





All times are GMT +1. The time now is 03:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com