Hi all
Can someone please teach me how I can convert data from a column into a row? Basically I have regression outputs that are exported from a text format which look something like this :
<table border="0" cellpadding="0" cellspacing="0" width="264"><col style="mso-width-source:userset;mso-width-alt:2925;width:60pt" width="80"> <col style="mso-width-source:userset;mso-width-alt:3510;width:72pt" width="96"> <col style="mso-width-source:userset;mso-width-alt:3218;width:66pt" width="88"> <tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:60pt" height="20" width="80">Variable</td> <td style="width:72pt" width="96">Coeff</td> <td style="width:66pt" width="88">Std Error</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">**************</td> <td>*************</td> <td>*************</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">1. Mean(1)</td> <td align="right">0.0424234</td> <td align="right">0.011516468</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">2. Mean(2)</td> <td align="right">0.03833762</td> <td align="right">0.015204564</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">3. Mean(3)</td> <td align="right">0.057602779</td> <td align="right">0.02190734</td> </tr> </tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="264"><tbody><tr height="20"><tr style="height:15.0pt" height="20"><td style="height:15.0pt;width:60pt" height="20" width="80">Variable</td><td style="width:72pt" width="96">Coeff</td><td style="width:66pt" width="88">Std Error</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">*************</td><td>*************</td><td>*************</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">1. Mean(1)</td><td align="right">0.0424234</td><td align="right">0.011516468</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">2. Mean(2)</td><td align="right">0.03833762</td><td align="right">0.015204564</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">3. Mean(3)</td><td align="right">0.057602779</td><td align="right">0.02190734</td></tr></tr></tbody></table>
i have about 500 of these outputs aligned in a column, but what I'm trying to do is to align them into rows like this:
<table border="0" cellpadding="0" cellspacing="0" width="256"><col style="width:48pt" span="4" width="64"> <tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:48pt" height="20" width="64">
</td> <td style="width:48pt" width="64">Mean(1)</td> <td style="width:48pt" width="64">Mean(2)</td> <td style="width:48pt" width="64">Mean(3)</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">output1</td> <td>a</td> <td>b</td> <td>c</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">output2</td> <td>d</td> <td>e</td> <td>f</td> </tr> </tbody></table>
Is it possible for me to design a macro that will grab those particular 3 cells in the column and put them into rows?
Thanks in advance, I appreciate the help!
Can someone please teach me how I can convert data from a column into a row? Basically I have regression outputs that are exported from a text format which look something like this :
<table border="0" cellpadding="0" cellspacing="0" width="264"><col style="mso-width-source:userset;mso-width-alt:2925;width:60pt" width="80"> <col style="mso-width-source:userset;mso-width-alt:3510;width:72pt" width="96"> <col style="mso-width-source:userset;mso-width-alt:3218;width:66pt" width="88"> <tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:60pt" height="20" width="80">Variable</td> <td style="width:72pt" width="96">Coeff</td> <td style="width:66pt" width="88">Std Error</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">**************</td> <td>*************</td> <td>*************</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">1. Mean(1)</td> <td align="right">0.0424234</td> <td align="right">0.011516468</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">2. Mean(2)</td> <td align="right">0.03833762</td> <td align="right">0.015204564</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">3. Mean(3)</td> <td align="right">0.057602779</td> <td align="right">0.02190734</td> </tr> </tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="264"><tbody><tr height="20"><tr style="height:15.0pt" height="20"><td style="height:15.0pt;width:60pt" height="20" width="80">Variable</td><td style="width:72pt" width="96">Coeff</td><td style="width:66pt" width="88">Std Error</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">*************</td><td>*************</td><td>*************</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">1. Mean(1)</td><td align="right">0.0424234</td><td align="right">0.011516468</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">2. Mean(2)</td><td align="right">0.03833762</td><td align="right">0.015204564</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">3. Mean(3)</td><td align="right">0.057602779</td><td align="right">0.02190734</td></tr></tr></tbody></table>
i have about 500 of these outputs aligned in a column, but what I'm trying to do is to align them into rows like this:
<table border="0" cellpadding="0" cellspacing="0" width="256"><col style="width:48pt" span="4" width="64"> <tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:48pt" height="20" width="64">
</td> <td style="width:48pt" width="64">Mean(1)</td> <td style="width:48pt" width="64">Mean(2)</td> <td style="width:48pt" width="64">Mean(3)</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">output1</td> <td>a</td> <td>b</td> <td>c</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">output2</td> <td>d</td> <td>e</td> <td>f</td> </tr> </tbody></table>
Is it possible for me to design a macro that will grab those particular 3 cells in the column and put them into rows?
Thanks in advance, I appreciate the help!