Formula to turn 7 columns into 2 columns of data?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
I currently have a situation where i need to combine 7 columns of data into 2 columns using only formulas?
(I can do this with VBA but we are sharing this over excel online and VBA does not work.)

so Column C has the names in it, Columns E G J L N P have the data i want to turn into one column

So in S for example I'll have the names in column C repeated 6 times, in T ill have all data in E then G, J and so on.
you can assume the Columns start at row 10 and go down to the last bit of data, every columns has same number of data in it.

Please help if you can
Thanks
Tony
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi TonyWatsonHelp,

Does this do what you want?

TonyWatsonHelp3.xlsx
CEGJLNPQRST
9IamCIamEIamGIamJIamLIamNIamPST
10BobBobIamEBobIamGBobIamJBobIamLBobIamNBobIamPBobBobIamE
11JimJimIamEJimIamGJimIamJJimIamLJimIamNJimIamPBobBobIamG
12SueSueIamESueIamGSueIamJSueIamLSueIamNSueIamPBobBobIamJ
13TimTimIamETimIamGTimIamJTimIamLTimIamNTimIamPBobBobIamL
14BobBobIamN
15BobBobIamP
16JimJimIamE
17JimJimIamG
18JimJimIamJ
19JimJimIamL
20JimJimIamN
21JimJimIamP
22SueSueIamE
23SueSueIamG
24SueSueIamJ
Sheet1
Cell Formulas
RangeFormula
S10:S24S10=IF((ROW()-10)>=COUNTA($C$10:$C$9999)*6,"",INDEX($C$10:$C$9999,INT((ROW()-4)/6)))
T10:T24T10=IF(S10="","",INDEX($E$10:$P$9999,INT((ROW()-4)/6),INDEX({1,3,6,8,10,12},INT(MOD((ROW()-4),6))+1)))
 
Upvote 0
Another option, if you have the LET function in 365.
+Fluff 1.xlsm
CDEFGHIJKLMNOPQRST
9IamCIamEIamGIamJIamLIamNIamPBobBobIamE
10BobBobIamEBobIamGBobIamJBobIamLBobIamNBobIamPBobBobIamG
11JimJimIamEJimIamGJimIamJJimIamLJimIamNJimIamPBobBobIamJ
12SueSueIamESueIamGSueIamJSueIamLSueIamNSueIamPBobBobIamL
13TimTimIamETimIamGTimIamJTimIamLTimIamNTimIamPBobBobIamN
14BobBobIamP
15JimJimIamE
16JimJimIamG
17JimJimIamJ
18JimJimIamL
19JimJimIamN
20JimJimIamP
21SueSueIamE
22SueSueIamG
23SueSueIamJ
24SueSueIamL
25SueSueIamN
26SueSueIamP
27TimTimIamE
28TimTimIamG
29TimTimIamJ
30TimTimIamL
31TimTimIamN
32TimTimIamP
33
Master
Cell Formulas
RangeFormula
S9:T32S9=LET(LastRow,LOOKUP(2,1/(C10:C9999<>""),ROW(C10:C9999))-9,Qty,SEQUENCE(LastRow*6,,0),INDEX($C$10:$P$9999,INT(Qty/6)+1,CHOOSE(MOD(Qty,6)+1,{1,3},{1,5},{1,8},{1,10},{1,12},{1,14})))
Dynamic array formulas.
 
Upvote 0
One more option: Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"IamC", type text}, {"Column1", type any}, {"IamE", type text}, {"Column2", type any}, {"IamG", type text}, {"Column3", type any}, {"Column4", type any}, {"IamJ", type text}, {"Column5", type any}, {"IamL", type text}, {"Column6", type any}, {"IamN", type text}, {"Column7", type any}, {"IamP", type text}}),
    #"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"IamC", "IamE", "IamG", "IamJ", "IamL", "IamN", "IamP"}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Removed Other Columns", {"IamC"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"})
in
    #"Removed Columns"
 
Upvote 0
Another 365 option (assuming no blanks in the column C data)

21 09 27.xlsm
CDEFGHIJKLMNOPQRST
9IamCIamEIamGIamJIamLIamNIamPBobBobIamE
10BobBobIamEBobIamGBobIamJBobIamLBobIamNBobIamPBobBobIamG
11JimJimIamEJimIamGJimIamJJimIamLJimIamNJimIamPBobBobIamJ
12SueSueIamESueIamGSueIamJSueIamLSueIamNSueIamPBobBobIamL
13TimTimIamETimIamGTimIamJTimIamLTimIamNTimIamPBobBobIamN
14BobBobIamP
15JimJimIamE
16JimJimIamG
17JimJimIamJ
18JimJimIamL
19JimJimIamN
20JimJimIamP
21SueSueIamE
22SueSueIamG
23SueSueIamJ
24SueSueIamL
25SueSueIamN
26SueSueIamP
27TimTimIamE
28TimTimIamG
29TimTimIamJ
30TimTimIamL
31TimTimIamN
32TimTimIamP
7 to 2
Cell Formulas
RangeFormula
S9:T32S9=LET(s,SEQUENCE(COUNTA(C10:C9999)*6,,0,1/6),INDEX(C10:P9999,s+1,CHOOSE(MOD(ROUND(s*6,0),6)+1,{1,3},{1,5},{1,8},{1,10},{1,12},{1,14})))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,691
Members
448,978
Latest member
rrauni

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