Solved

How do I merge two columns of data

Posted on 2011-03-08
5
250 Views
Last Modified: 2012-05-11
I have a spreadsheet with 3700 rows. Column B contains a city code and Column E contains the actual location number. I am trying to get all output to look as follows 050-0000

I have included an excel sampl spreadsheet as well. My source is in yellow I am trying to concatinate or merge as the green cells.

Thank you

concatinationexample01.xlsx
0
Comment
Question by:manelson05
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 500 total points
ID: 35069187
In B14 of the sample spreasheet, enter this formula:

=CONCATENATE(B2,"-",E2)

You can copy it to other cells.

Sincerely,
Ed
0
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 35069208
See the attached file


Ed
concatinationexample01-1-.xlsx
0
 
LVL 12

Expert Comment

by:sstampf
ID: 35069270
You can also use:
=B2 & "-" & E2
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 35069435
You can even use this macro

Sub concaddr()
For Each cel In Intersect(ActiveSheet.UsedRange, Range("B:B"))
If cel.Value <> "" And cel.Row > 1 Then cel.Value = cel & "-" & cel.Offset(0, 3)
Next cel
End Sub
0
 

Author Closing Comment

by:manelson05
ID: 35069725
Verym very, very helpful Sir.

Thank you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question