turning column into rows

avandever

Board Regular
Joined
Dec 7, 2010
Messages
83
I have a two column table and would like to turn my row titles into columns titles and have the value associated to it come along.

<table border="0" cellpadding="0" cellspacing="0" width="128"><col style="width: 48pt;" span="2" width="64"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 48pt;" align="right" height="20" width="64">1-Jan</td> <td style="width: 48pt;" align="right" width="64">1</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">2-Jan</td> <td align="right">2</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">3-Jan</td> <td align="right">3</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">4-Jan</td> <td align="right">4</td> </tr> </tbody></table>

<table border="0" cellpadding="0" cellspacing="0" width="256"><col style="width: 48pt;" span="4" width="64"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 48pt;" align="right" height="20" width="64">1-Jan</td> <td class="xl65" style="width: 48pt;" align="right" width="64">2-Jan</td> <td class="xl65" style="width: 48pt;" align="right" width="64">3-Jan</td> <td class="xl65" style="width: 48pt;" align="right" width="64">4-Jan</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="right" height="20">1</td> <td align="right">2</td> <td align="right">3</td> <td align="right">4</td> </tr> </tbody></table>
in the first cell in my 2nd table under 1-Jan i have the formula =Sheet1!$B1 and when i drag that cell across i expected the formula to go to =Sheet1!$B2, =Sheet1!$B3, =Sheet1!$B4... it does not and just stays with =Sheet1!$B1 for all cells. thanks.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
That is not going to work. the $B is the column and the 1 is the row. Since you are moving across the columns the row reference will not change.
 
Upvote 0
Hi

You can use Copy, Paste Special->Transpose.

Does this solve your problem or do you prefer a formula?
 
Upvote 0

Forum statistics

Threads
1,224,504
Messages
6,179,144
Members
452,891
Latest member
JUSTOUTOFMYREACH

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