auto re arrange data

amirkharkongor

New Member
Joined
Nov 8, 2021
Messages
12
Office Version
  1. 2019
  2. 2016
  3. 2010
Platform
  1. Windows
  2. Web
is there any solution / formula to re arrange the following example :

My sheet
nameagegendernameagegendernameagegender
aaa15Mbbb16Mccc14F
ddd13Feee14Mfff17M
Formula to rearrange in the following manner
nameagegender
aaa15M
bbb16M
ccc14F
ddd13F
eee14M
fff17M
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I'm assuming this is sample data. How many 3 column wide sections does your actual data have?
This can probably be done much easier with 365 (using LET, FILTER, and LAMBDA Functionality ) than with the functions you have in 2019.
So, knowing the scale of your question could be important in creating a scalable solution.
 
Upvote 0
I'm assuming this is sample data. How many 3 column wide sections does your actual data have?
This can probably be done much easier with 365 (using LET, FILTER, and LAMBDA Functionality ) than with the functions you have in 2019.
So, knowing the scale of your question could be important in creating a scalable solution.
The data sheet is generated from google form (with 6 sections) that I have created.
 
Upvote 0
Here a PowerQuery solution

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    headers = List.FirstN(Table.ColumnNames(Source),3),
    data = List.Combine(Table.ToRows(Source)),
    lName = List.Alternate(data,2,1,1),
    lGender = List.Alternate(data,2,1),
    lAge = List.RemoveItems(data,lName & lGender),
    lCombined = Table.FromRows(List.Zip({lName,lAge,lGender}),headers)
in
    lCombined

1708081853978.png
 
Upvote 0
Solution
Thank you so much sir.

But while trying another problem comes up. Kindly help me how to re arrange the following. I am really new to Excel formulas please help me


aaaEnglishMathsHistory
bbbGeographyScienceEnglish
cccEnglishScienceMaths

to



aaaEnglish
aaaMaths
aaaHistory
bbbGeography
bbbScience
bbbEnglish
cccEnglish
cccScience
cccMaths
 
Upvote 0
Simply unpivot other columns(one click in PQ)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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