View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Xpose twenty rows then the next twent etc.

Hi Howard,

Am Wed, 4 Sep 2013 23:00:52 -0700 (PDT) schrieb Howard:

100 strings like these two - works fine.
MAE511363
XEL551995

With this
100 to 199 I get five Scientific Notations like this 1.00101102103104E+59


first, you don't need the MIN
The comma is the separator for the thousands and so you will get a very
great number. Try semicolon as separator if you have numbers in your
range:

Sub SuperJoin()
Dim i As Long, x As Long
For i = 1 To Range("A" & Rows.Count).End(xlUp).Row Step 20
x = x + 1
With WorksheetFunction
Range("B" & x) = Join(Application.Transpose( _
Range(Cells(i, 1), Cells(i + .CountA( _
Range(Cells(i, 1), Cells(i + 19, 1))) - 1, 1))), ";")
End With
Next
End Sub

or comma with a following space:

Sub SuperJoin()
Dim i As Long, x As Long
For i = 1 To Range("A" & Rows.Count).End(xlUp).Row Step 20
x = x + 1
With WorksheetFunction
Range("B" & x) = Join(Application.Transpose( _
Range(Cells(i, 1), Cells(i + .CountA( _
Range(Cells(i, 1), Cells(i + 19, 1))) - 1, 1))), ", ")
End With
Next
End Sub


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2