manelson05
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also use:
=B2 & "-" & E2
=B2 & "-" & E2
You can even use this macro
Sub concaddr()
For Each cel In Intersect(ActiveSheet.Used Range, Range("B:B"))
If cel.Value <> "" And cel.Row > 1 Then cel.Value = cel & "-" & cel.Offset(0, 3)
Next cel
End Sub
Sub concaddr()
For Each cel In Intersect(ActiveSheet.Used
If cel.Value <> "" And cel.Row > 1 Then cel.Value = cel & "-" & cel.Offset(0, 3)
Next cel
End Sub
ASKER
Verym very, very helpful Sir.
Thank you
Thank you
Ed
concatinationexample01-1-.xlsx