Group:  Microsoft Word ยป microsoft.public.word.tables
Thread: The tables are turned! Well... not yet.

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

The tables are turned! Well... not yet.
Cooz 02.06.2006 14:49:01
Hi everyone,

Is there a way to turn a Word table so that its columns become rows and its
rows become columns? If yes... how?

Thank you,
Cooz
Re: The tables are turned! Well... not yet.
"macropod" <invalid[ at ]invalid.invalid> 02.06.2006 15:14:25
hi Cooz,

You can't turn rows into columns and vice-versa, as such. However, if all
you want to achieve is to have the text on side, select the relevant cells
and use Format|Text direction. Alternatively, put your table on a page laid
out in landscape if the rest of your document is portrait, or vice-versa.

Cheers

--
macropod
[MVP - Microsoft Word]


"Cooz" <Cooz[ at ]discussions.microsoft.com> wrote in message
news:2EF6AD61-DE13-4B5A-85E3-D52D9BCE2AFF[ at ]microsoft.com...
[Quoted Text]
> Hi everyone,
>
> Is there a way to turn a Word table so that its columns become rows and
its
> rows become columns? If yes... how?
>
> Thank you,
> Cooz


Re: The tables are turned! Well... not yet.
"Suzanne S. Barnhill" <sbarnhill[ at ]mvps.org> 02.06.2006 15:53:13
Although "macropod" has given you the options within Word, there is a way to
transpose the rows and columns, but it will work only if the table is fairly
simple (no merged cells, not too much fancy formatting). Copy the table in
Word, then open Excel and use Paste Special: Transpose. This will swap the
rows and columns, and you can then copy/paste the text back into Word.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Cooz" <Cooz[ at ]discussions.microsoft.com> wrote in message
news:2EF6AD61-DE13-4B5A-85E3-D52D9BCE2AFF[ at ]microsoft.com...
[Quoted Text]
> Hi everyone,
>
> Is there a way to turn a Word table so that its columns become rows and
its
> rows become columns? If yes... how?
>
> Thank you,
> Cooz

Re: The tables are turned! Well... not yet.
Helmut Weber <nbhymsjxdgcn[ at ]mailinator.com> 05.06.2006 17:59:16
Hi Cooz,

[Quoted Text]
>Is there a way to turn a Word table
>so that its columns become rows and its
>rows become columns? If yes... how?

yes and no,

simple only if the number of columns equals
the number of rows.
Otherwise you have to create a new table, based on the
data from the old table.

Rows x columns has always to be the same.

Fancy things like embedded tables,
split and merged cells, embedded objects etc.
would make it very difficult.

The principle for cells containing nothing but text
and regardless of formatting, is:

Sub Test0004()
Dim lCll As Long ' number of cells
Dim l As Long ' just a counter
lCll = ActiveDocument.Tables(1).Range.Cells.Count
' create an array representing all the cells
' from left to right for each row
ReDim aCell(1 To lCll) As String
For l = 1 To lCll
aCell(l) = ActiveDocument.Tables(1).Range.Cells(l).Range.Text
Next
' now you've got all text from all cells
' in a one dimensional array
' and can arrange the data as you please
End Sub

Theory only.
Get Excel to help you, as Suzanne recommended.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"






RE: The tables are turned! Well... not yet.
Cooz 06.06.2006 14:09:02
Thank you, macropod, Suzanne and Helmut for your response.

Cooz



"Cooz" wrote:

[Quoted Text]
> Hi everyone,
>
> Is there a way to turn a Word table so that its columns become rows and its
> rows become columns? If yes... how?
>
> Thank you,
> Cooz
Re: The tables are turned! Well... not yet.
Bob S <notarealaddress[ at ]110.net> 22.06.2006 19:53:11
I was looking at this and found a way to do it entirely in Word with
no macros. It is a bit tedious if the table has a lot of columns
though...

Make some spare space below your table with empty paragraphs. Select
and copy the first column of the table and paste it into the spare
space, giving you a one-column table. Select and copy the second
column of the original table and paste it immediately below the new
table, giving you a longer one column table. Keep doing this until you
have done every column in the original table. Now select the new
one-column table, convert it to text, and convert it back to a table
with the proper number of columns (i.e. the original number of rows).

Bob S

On Fri, 2 Jun 2006 07:49:01 -0700, Cooz wrote:

[Quoted Text]
>Hi everyone,
>
>Is there a way to turn a Word table so that its columns become rows and its
>rows become columns? If yes... how?
>
>Thank you,
>Cooz

Re: The tables are turned! Well... not yet.
Cooz 23.06.2006 14:28:02
Hi Bob,

That's one fine solution. Thank you!

Cooz



"Bob S" wrote:

[Quoted Text]
> I was looking at this and found a way to do it entirely in Word with
> no macros. It is a bit tedious if the table has a lot of columns
> though...
>
> Make some spare space below your table with empty paragraphs. Select
> and copy the first column of the table and paste it into the spare
> space, giving you a one-column table. Select and copy the second
> column of the original table and paste it immediately below the new
> table, giving you a longer one column table. Keep doing this until you
> have done every column in the original table. Now select the new
> one-column table, convert it to text, and convert it back to a table
> with the proper number of columns (i.e. the original number of rows).
>
> Bob S
>
> On Fri, 2 Jun 2006 07:49:01 -0700, Cooz wrote:
>
> >Hi everyone,
> >
> >Is there a way to turn a Word table so that its columns become rows and its
> >rows become columns? If yes... how?
> >
> >Thank you,
> >Cooz
>
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net