Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / May 2006

Tip: Looking for answers? Try searching our database.

Combine Two Colums

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sawyer - 12 May 2006 20:02 GMT
Hello All
Need help with the script below or maybe a better one. I need to combine the
items in Column A and Column B into one Column
The one below will combine the data into one column but it is backward, I
need the text in column B to be added after the text in column A
Thanks for any help Scott

Sub addData()
For r = 2 To 100
  Cells(r, "D").Value = "@website.com" & Cells(r, "D").Value
Next r
End Sub

This is what I have
   A                    B                            C                    D
E
1 Jimmy        @website.com
2 Jimmy         @website.com
3 Jimmy        @website.com
4 Jimmy        @website.com
5
6
Sample of what I need

       a                                    b                            c
d                        e
1  Jimmy@website.com
2 Jimmy@website.com
3 Jimmy@website.com
4 Jimmy@website.com
5 Jimmy@website.com
6
7
8
JMB - 12 May 2006 21:53 GMT
You could just enter =A1&B1 in cell D1 and copy it down.

> Hello All
> Need help with the script below or maybe a better one. I need to combine the
[quoted text clipped - 30 lines]
> 7
> 8
RajKohli - 13 May 2006 06:12 GMT
Apply the formula said by JMB and after that hide the original columns if you
don't want them. Donot delete them.

> Hello All
> Need help with the script below or maybe a better one. I need to combine the
[quoted text clipped - 30 lines]
> 7
> 8
excelent - 13 May 2006 09:39 GMT
Sub addData2()
Dim r
For r = 2 To 100
  Cells(r, 1).Value = Cells(r, 1).Value & Cells(r, 2)
Next r
End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.