View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] garyusenet@myway.com is offline
external usenet poster
 
Posts: 33
Default Merge columns into one column

I'm fairly new at this and it's a steep learning curve - there are no
doubt more elegent ways to do this.. but if you have a limited number
of columns that you need to work with and you know the columns in
advance, this will do the trick...

================================================== =====
Sub merge()
Dim somestring As String
Dim somestring2 As String
Dim somestring3 As String
Dim mergedstring As String

somestring = Range("b1").Value
somestring2 = Range("c1").Value
somestring3 = Range("d1").Value

mergedstring = somestring & " " & somestring2 & " " & somestring3
Range("a1").Value = mergedstring

End Sub

================================================== =====

HTH

Gary