# Rows to Columns

#### bobbabuoy

##### New Member
I have an excel sheet with about 2500 rows that is set up so that related information are in 'groups' of 3. For instance, a1, a2, and a3 are related, as are a4, a5, and a6. I want to split these groups up into columns. For instance, I want to move a2 to b1 and a3 to c1. Then I want to move a4 to a2, a5 to b2, and a6 to c2, etc.

I have one idea and that is to copy the data as it exists now to columns b and c, delete the first item in b and the first two items in c and then go through and delete every 2nd/3rd rows. Is there a better way?

Thanks!

### Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

#### ken2step

##### Well-known Member
I think this might be what you want....

Insert/worksheet

In Cell A1 of new sheet enter =Sheet1!A1
In Cell B1 of new sheet enter =Sheet1!A2
In Cell C1 of new sheet enter =Sheet1!A3

In Cell A2 of new sheet enter =INDIRECT("Sheet1!"&(ADDRESS(A1+3,1,4)))

Fill this formula across B2 and C2, then down as far as needed.

Ken

#### al_b_cnu

##### Well-known Member
Hi

Welcome to the board.

Here's a macro solution which places the data in columns B,c & D.

Code:
``````Sub Group3()
Dim R As Range
Dim lRowEnd As Long
Dim lRowA As Long
Dim lRowBCD
Dim lCol As Long

lRowEnd = Range("A65536").End(xlUp).Row
lRowBCD = 0
lCol = 4
For Each R In Range("A1:A" & lRowEnd)
If lCol > 3 Then
lCol = 2
lRowBCD = lRowBCD + 1
Else
lCol = lCol + 1
End If
Cells(lRowBCD, lCol).Value = R.Value
Next R
End Sub``````

HTH

Alan

#### bobbabuoy

##### New Member
Thanks, and I like this forum!!!

Replies
14
Views
229
Replies
5
Views
293
Replies
5
Views
111
Replies
1
Views
163
Replies
13
Views
1K

1,187,188
Messages
5,962,112
Members
438,585
Latest member
peterLEE0223

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back