Concatenate Question

D

Dan R.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top