Link to home
Start Free TrialLog in
Avatar of manelson05
manelson05Flag for United States of America

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of MINDSUPERB
MINDSUPERB
Flag of Kuwait image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
See the attached file


Ed
concatinationexample01-1-.xlsx
Avatar of sstampf
You can also use:
=B2 & "-" & E2
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
Avatar of manelson05

ASKER

Verym very, very helpful Sir.

Thank you