SOLVED

DATA RESTRUCTURING USING EXCEL

Copper Contributor

Hi Excel Community,

i'm using Office 365.

i want to manage my data using excel. below is my sample data.

 

Paper NumbSpeaker 1 NameSpeaker 1 CountrySpeaker 2 NameSpeaker 2 CountrySpeaker 3 NameSpeaker 3 CountryChair 1 NameChair 1 CountrChair 2 NameChair 2 Country
Paper 1AliMalaysiaBurhanChinaDaudBrazilDollahUAEZikriPakistan
Paper 2AbuMalaysiaBashahIndiaEmiliaUSFaridVietnamAdliPakistan
Paper 3ArifMalaysiaBrentUSEmySingaporeFuadIndiaHarunBrazil

 

 

i want to restructure above table to below data structure.

Paper NumbRoleNameCountry
Paper 1Speaker 1AliMalaysia
Paper 1Speaker 2BurhanChina
Paper 1Speaker 3DaudBrazil
Paper 1Chair 1DollahUAE
Paper 1Chair 2ZikriPakistan
Paper 2Speaker 1AbuMalaysia
Paper 2Speaker 2BashahIndia
Paper 2Speaker 3EmiliaUS
Paper 2Chair 1FaridVietnam
Paper 2Chair 2AdliPakistan
Paper 3Speaker 1ArifMalaysia
Paper 3Speaker 2BrentUS
Paper 3Speaker 3EmySingapore
Paper 3Chair 1FuadIndia
Paper 3Chair 2HarunBrazil

 

Appreciate if you can help me how to restructure my sample data using excel. thank you

 

10 Replies

You can use three formulas to unwind your data as you described.

 

see attached workbook example and the video that shows how you can do that.

 

First formula 

 

=INDEX($F$2:$F$4,INT((ROWS($B$8:$B8)-1)/5)+1)

 

 

Second formula

=SUBSTITUTE(SUBSTITUTE(INDEX($G$1:$P$1,1,(MOD((ROWS($B$8:B8)-1),5)+1)*2),"Country",""),"Name","")

Third Formula

 

=INDEX($G$2:$P$4,MATCH($A8,$F$2:$F$4,0),MATCH($B8&C$7,$G$1:$P$1,0))

 

 

 

 

Hi

 

First unpivot, then pivot.

Done with Power Query.

 

from Detlef's attachment you can see that it can be done using power query and If you could not figures it out from the applied steps in PQ and you are wondering how he has done it.  Attached is the video that demonstrates how it is done in Power Query.

Amazing feedback from you guys. I will study base on your suggestion. Thank you very much
Amazing feedback from you guys. I will study base on your suggestion. Thank you very much

Thanks a lot Jamil. its working. i'm really appreciate your effort to make tutorial video for me. may you successful in your life journey. 

You are welcome. Thanks for your feedback.

السلام عليكم

Dear Jamil.

i having another problem to manage multiple column to restructure format database.

please find the attachment for your reference. 

for your information, 

 

below details is one variable (Role)

Organizer
Chair
Discussant 1
Discussant 2
Speaker 1
Speaker 2
Speaker 3
Speaker 4
Speaker 5
Speaker 6
Speaker 7
Speaker 8
Speaker 9

 

appreciate if you can help me 

 

best response confirmed by office 365 office 365 (Copper Contributor)
Solution

وعليكم السلام

 

I have recorded a video for you that demonstrates the use of power query to transform your data.

 

Please see attached video.

 

 

Thank you for your superb video:)
1 best response

Accepted Solutions
best response confirmed by office 365 office 365 (Copper Contributor)
Solution

وعليكم السلام

 

I have recorded a video for you that demonstrates the use of power query to transform your data.

 

Please see attached video.

 

 

View solution in original post