Moving the columns from horizontal to vertical

dankar

Board Regular
Joined
Mar 23, 2016
Messages
113
Office Version
  1. 365
Platform
  1. Windows
ID
FIRST NAME
LAST NAME
DATE
PHONE#
1
ALLAN
SMITH
05/30/2019
4701325555

<tbody>
</tbody>

To become like this:


ID
1
FIRST NAME
ALLAN
LAST NAME
SMITH
DATE
05/30/2019
PHONE#
4701325555

<tbody>
</tbody>


Hi,

1. I have an excel file with over than 200 columns, I want to copy the heading to vertical position.

2. If possible also to copy the result also.

is there an easy way to do this. thanks
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
This is pretty easy to do. Let's work with your example (and let's say the data is in cella A1:E2).
1. Select the entire range (A1:E2)
2. Select Copy (CTRL + C)
3. Select cell A3
4. Right-click, and select Paste Special --> Transpose --> OK
5. Delete rows 1 and 2

That's it!
It will work for 200 columns just as easily as it does for 5
 
Last edited:
Upvote 0
An alternative option is to bring the data into Power Query and unpivot the columns.

Here is the Mcode

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value")
in
    #"Unpivoted Columns"

vAB
1AttributeValue
2ID1
3FIRST NAMEALLAN
4LAST NAMESMITH
5DATE5/30/2019
6PHONE#4701325555
 
Upvote 0

Forum statistics

Threads
1,214,377
Messages
6,119,183
Members
448,872
Latest member
lcaw

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