Copy data from 1 column to split columns

gjvv

New Member
Joined
Mar 20, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello,
I got a huge list with data, but this is 1 column, with 2 variables. See my example file.
My goal is to get the data into 2 columns. In the example file, there's a macro which does the job for only a few rows. But with thousand rows, it will not work.

I was thinking to add a column in front with 2 different names (can be done manually), so I could copy all the data from column C to column D (- 1 row), and then delete all rows containing "Color".
But how?

Thanks in advance!

GJ

Here's my Minisheet:
Example.xlsm
ABCDEFGHIJKLMNOP
1Goal:Alternitive approach
2
3TypeColor
4Paper 01Paper 01yellowTypePaper 01
5yellowPaper 02redColoryellow
6Paper 02Paper 03greenTypePaper 02
7redPaper 04purpleColorred
8Paper 03Paper 05blueTypePaper 03
9greenColorgreen
10Paper 04TypePaper 04
11purpleColorpurple
12Paper 05TypePaper 05
13BlueColorBlue
14
15
16
17
18Excisting macrobackup data (to copy in B19)
19
20
21Paper 01Paper 01
22yellowyellow
23Paper 02Paper 02
24redred
25Paper 03Paper 03
26greengreen
27Paper 04Paper 04
28purplepurple
29Paper 05Paper 05
30BlueBlue
31
32
33
34
35
36
37
Blad1
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Sorry bit confused by the data, is it the below you want to get to?
Book1
ABCDEFG
1TOCOLTypeColorWRAPROWS
2Paper 01Paper 01yellowPaper 01yellow
3yellowPaper 02redPaper 02red
4Paper 02Paper 03greenPaper 03green
5redPaper 04purplePaper 04purple
6Paper 03Paper 05bluePaper 05blue
7green
8Paper 04
9purple
10Paper 05
11blue
Sheet1
Cell Formulas
RangeFormula
A2:A11A2=TOCOL(C2:D6)
F2:G6F2=WRAPROWS(A2#,2)
Dynamic array formulas.
 
Upvote 0
Thanks for the reply. I can't edit my post, so here's an explanation.
Based on my Minisheet: forget all other data around B2:I15. The Minisheet doesn't work with the macro.

The goal is to transform the data from column C into 2 columns with the data separated in Type ("Paper ##") and Color.
So basicly, put all values from the even rownumbers besides the values from the uneven rownumbers. Column C doesn't have to be deleted necessarily.

I can't get the formulas you use to work. The TOCOL results in a SPILL-fault, and the WRAPROWS in a #REF!-fault.
Where do you put those formulas? Because in A2, there's the value "Paper 01".

Best regards,
GJ
 
Upvote 0
The wraprows works as below, i tried to keep the data as you displayed it:
Book1
ABCDEFGHIJ
1Goal:
2
3TypeColor
4Paper 01Paper 01yellow
5yellowPaper 02red
6Paper 02Paper 03green
7redPaper 04purple
8Paper 03Paper 05Blue
9green
10Paper 04
11purple
12Paper 05
13Blue
14
15
16
17
Sheet2
Cell Formulas
RangeFormula
G4:H8G4=WRAPROWS(C4:C13,2)
Dynamic array formulas.
 
Upvote 0
Solution
The wraprows works as below, i tried to keep the data as you displayed it:
Book1
ABCDEFGHIJ
1Goal:
2
3TypeColor
4Paper 01Paper 01yellow
5yellowPaper 02red
6Paper 02Paper 03green
7redPaper 04purple
8Paper 03Paper 05Blue
9green
10Paper 04
11purple
12Paper 05
13Blue
14
15
16
17
Sheet2
Cell Formulas
RangeFormula
G4:H8G4=WRAPROWS(C4:C13,2)
Dynamic array formulas.
Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,356
Messages
6,124,471
Members
449,163
Latest member
kshealy

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