Thread: Concatenating
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
duane duane is offline
external usenet poster
 
Posts: 64
Default Concatenating

if you are open to a macro, something like

assuming data starts in row 1, column a

Sub Macro1()
Dim groupcount As Integer
Dim grouping As Integer
Dim group(1000)
lastrow = Cells(1, 1).End(xlDown).Row
'set grouping to 16 cells
grouping = 16
groupcount = lastrow / grouping
groupcount = Application.WorksheetFunction.RoundUp(groupcount, 0)
For i = 1 To groupcount
For j = 1 To grouping
group(i) = Cells(i * grouping - j + 1, 1) & group(i)
Next j
Next i
' this leaves the groups in group(i)
' write them out anywhere you like by the following
' this puts them in colum E (column 5) rows 1 and up
For i = 1 To groupcount
Cells(i, 5) = group(i)
Next i
End Sub
"Himu" wrote:

Here is a simplified version of my problem:I have a column of about 1000
numbers, lets say all the numbers are in the column A. I want to take the
first 16 numbers andconcatenate them so that they are arranged like this:
A16A15A14A13A12A11A10....A1. Then I want take the next 16 numbers of the
column and do the same thing. I want to repeat this for the numbers that I
have in that column.

Please help!

HIMU