How do I merge two columns of data

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
manelson05Asked:
Who is Participating?
 
MINDSUPERBConnect With a Mentor Commented:
In B14 of the sample spreasheet, enter this formula:

=CONCATENATE(B2,"-",E2)

You can copy it to other cells.

Sincerely,
Ed
0
 
MINDSUPERBCommented:
See the attached file


Ed
concatinationexample01-1-.xlsx
0
 
sstampfCommented:
You can also use:
=B2 & "-" & E2
0
 
Saqib Husain, SyedEngineerCommented:
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
 
manelson05Author Commented:
Verym very, very helpful Sir.

Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.