View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dan R. Dan R. is offline
external usenet poster
 
Posts: 220
Default Concatenate Question

I'm using this to concat. all of Col A into cell B1. But rather than
concat. the entire column I'd like to split it up into parts. For
example, concat. Range("A1:A50") into cell B1, Range("A51:A100") into
cell B2, etc. Thanks guys, here's my code:

Sub ConCat()
Dim Val As String
Dim iEnd As Long
Dim i As Long

iEnd = Cells.Find(What:="*", _
After:=Range("A1"), _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row

For i = 1 To iEnd
Val = Val & Cells(i, 1) & ","

Cells(1, "B").Value = Val

Next i
End Sub

Thank You,
-- Dan