Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Concatenate Question
Hi Dan
Try J.E's code http://www.mcgimpsey.com/excel/udfs/multicat.html -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Dan R." wrote in message ups.com... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Concatenate Question
That's perfect Ron, thanks.
-- Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Concatenate question | Excel Discussion (Misc queries) | |||
Concatenate question | Excel Worksheet Functions | |||
CONCATENATE Question | Excel Discussion (Misc queries) | |||
Concatenate question | Excel Worksheet Functions | |||
Question about Concatenate and IIF | Excel Programming |