Consolidation of columns

Guddo

New Member
Joined
Apr 18, 2019
Messages
1
Hi,

I want formula to bring sets of four columns into one set of long columns. I have 1000+ columns vertically located so want to bring in one series. Please assist.


Current layout

a b c d e f g h I j k l
a b c d e f g h I j k l
a b c d e f g h I j k l
a b c d e f g h I j k l

Desired layout

a b c d
a b c d
a b c d
a b c d
e f g h
e f g h
e f g h
e f g h
I j k l
I j k l
I j k l
I j k l


Thanks.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try this
after replacing Sheet99 with correct sheet name

Code:
Sub ConsolCols()
    Dim rng As Range, cCount As Long, c As Long, ws As Worksheet
    With Sheets("[COLOR=#ff0000]Sheet99[/COLOR]")
        Set ws = Sheets.Add
        Set rng = .Range("A1", .Range("A" & Rows.Count).End(xlUp)).Resize(, 4)
        c = .Cells(1, Columns.Count).End(xlToLeft).Column
        c = Round(c / 4, 0)
        For cCount = 0 To c
            rng.Offset(, cCount * 4).Copy ws.Cells(Rows.Count, 1).End(xlUp).Offset(1)
        Next cCount
    End With
End Sub


Excel 2016 (Windows) 32 bit
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
1
ABCDEFGHIJKLMNOPQRST
2
ABCDEFGHIJKLMNOPQRST
3
ABCDEFGHIJKLMNOPQRST
Sheet: Sheet99

Excel 2016 (Windows) 32 bit
A
B
C
D
1
2
ABCD
3
ABCD
4
ABCD
5
EFGH
6
EFGH
7
EFGH
8
IJKL
9
IJKL
10
IJKL
11
MNOP
12
MNOP
13
MNOP
14
QRST
15
QRST
16
QRST
Sheet: SheetXX
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top