Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Concatenate Question

That's perfect Ron, thanks.

-- Dan

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate question scubadiver Excel Discussion (Misc queries) 4 May 21st 08 05:02 PM
Concatenate question DianaL Excel Worksheet Functions 4 March 27th 08 02:26 PM
CONCATENATE Question Anthony Excel Discussion (Misc queries) 4 March 16th 08 11:31 PM
Concatenate question nick Excel Worksheet Functions 3 July 27th 06 11:40 PM
Question about Concatenate and IIF Jack Excel Programming 6 March 29th 06 09:56 PM


All times are GMT +1. The time now is 05:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"