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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][th]
E
[/th][th]
F
[/th][th]
G
[/th][th]
H
[/th][th]
I
[/th][th]
J
[/th][th]
K
[/th][th]
L
[/th][th]
M
[/th][th]
N
[/th][th]
O
[/th][th]
P
[/th][th]
Q
[/th][th]
R
[/th][th]
S
[/th][th]
T
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td]A[/td][td]B[/td][td]C[/td][td]D[/td][td]E[/td][td]F[/td][td]G[/td][td]H[/td][td]I[/td][td]J[/td][td]K[/td][td]L[/td][td]M[/td][td]N[/td][td]O[/td][td]P[/td][td]Q[/td][td]R[/td][td]S[/td][td]T[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td]A[/td][td]B[/td][td]C[/td][td]D[/td][td]E[/td][td]F[/td][td]G[/td][td]H[/td][td]I[/td][td]J[/td][td]K[/td][td]L[/td][td]M[/td][td]N[/td][td]O[/td][td]P[/td][td]Q[/td][td]R[/td][td]S[/td][td]T[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td]A[/td][td]B[/td][td]C[/td][td]D[/td][td]E[/td][td]F[/td][td]G[/td][td]H[/td][td]I[/td][td]J[/td][td]K[/td][td]L[/td][td]M[/td][td]N[/td][td]O[/td][td]P[/td][td]Q[/td][td]R[/td][td]S[/td][td]T[/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet99[/td][/tr][/table]

Excel 2016 (Windows) 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td]A[/td][td]B[/td][td]C[/td][td]D[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td]A[/td][td]B[/td][td]C[/td][td]D[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td]A[/td][td]B[/td][td]C[/td][td]D[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td]E[/td][td]F[/td][td]G[/td][td]H[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td]E[/td][td]F[/td][td]G[/td][td]H[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
7
[/td][td]E[/td][td]F[/td][td]G[/td][td]H[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
8
[/td][td]I[/td][td]J[/td][td]K[/td][td]L[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
9
[/td][td]I[/td][td]J[/td][td]K[/td][td]L[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
10
[/td][td]I[/td][td]J[/td][td]K[/td][td]L[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
11
[/td][td]M[/td][td]N[/td][td]O[/td][td]P[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
12
[/td][td]M[/td][td]N[/td][td]O[/td][td]P[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
13
[/td][td]M[/td][td]N[/td][td]O[/td][td]P[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
14
[/td][td]Q[/td][td]R[/td][td]S[/td][td]T[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
15
[/td][td]Q[/td][td]R[/td][td]S[/td][td]T[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
16
[/td][td]Q[/td][td]R[/td][td]S[/td][td]T[/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: SheetXX[/td][/tr][/table]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

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