View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Multi Line Transpose Excel VBA code

Using a worksheet function enter this in B1 and copy across to F1

=INDEX($A:$A,(ROWS($1:1)-1)*5+COLUMNS($A:B)-1)

Select B1:F1 and copy down until you get zeros.

I know it's not code but it is one method.


Gord Dibben MS Excel MVP

On Tue, 11 Dec 2007 15:47:06 -0800 (PST), wrote:

I have data that is listed in one long vertical column:

ADAM1
ADAM2
ADAM3
ADAM4
ADAM5
BOAT1
BOAT2
BOAT3
BOAT4
BOAT5

the listings of the "ADAM" and "BOAT" is always 5.
I'm showing two (ADAM and BOAT) in this example, but in my reality
there are thousands.`

I need some code to move this data into horizontal cells like this:

ADAM1 ADAM2 ADAM3 ADAM4 ADAM5
BOAT1 BOAT2 BOAT3 BOAT4 BOAT5

Can someone get me started...