Skip to content
Related Articles

Related Articles

How to Convert Data from Wide to Long Format in Excel?

Improve Article
Save Article
Like Article
  • Last Updated : 09 Dec, 2021

Reshape data is an important step in Data analysis. Most of the time the raw data will be unstacked. The below example of the data presents each quarter in a column. Before doing further analysis user may need to know stack/pivot the data. In this article, we explain how to convert data from wide to long format in Excel. So we have a table that contains some data as shown in the below image:

Sample Data

Now we convert the data from wide to long format like as shown in the below image: 

So to this, we have to follow the following steps:

Step 1: In Excel, press Alt+D+P to popup PivotTable and PivotChart Wizard

Step 2: Select “Multiple Consolidation ranges“ then Click “Next“.

Step 3:  Select “I will create the page fields“ then Click “Next“.

Step 4: In Range input select the entire data range “Sheet1!$A$1:$E$6” then click “Next”.

Step 5: Select “New worksheet” and Click “Finish”.

Step 6: The previous step creates a pivot table like below in a new sheet. Double click the last cells in the Pivot. It will generate a long format of the pivot data in a new sheet as we expect.

So the final output is:

This is how we can easily convert data from wide to long format in Excel without wasting time.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!