Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
eraksoy eraksoy is offline
external usenet poster
 
Posts: 2
Default Converting Rows to columns

How do you convert Table 1 to Table2 in Word 2003 or 2007?

No A B
1 Arrow Black
2 Air Berry
Table 1

1 A Arrow
B Black
2 A Air
B Berry
Table 2

  #2   Report Post  
Posted to microsoft.public.word.tables
Herb Tyson [MVP] Herb Tyson [MVP] is offline
external usenet poster
 
Posts: 2,936
Default Converting Rows to columns

Cheat. Copy it to Excel. Copy/paste special in Excel choosing the Transpose
option, then copy/paste it back into Word. :-)


--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
"eraksoy" wrote in message
...
How do you convert Table 1 to Table2 in Word 2003 or 2007?

No A B
1 Arrow Black
2 Air Berry
Table 1

1 A Arrow
B Black
2 A Air
B Berry
Table 2


  #3   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Converting Rows to columns

And, if you don't like cheating:

' Transposer Macro
' Macro creaeted 18/01/1999 by Doug Robbins
' to transpose rows and columns in a table
NumCols = ActiveDocument.Tables(1).Columns.Count
NumRows = ActiveDocument.Tables(1).Rows.Count
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=NumCols,
NumColumns:= _
NumRows
RowCounter = 0
While RowCounter NumRows
ColCounter = 0
While ColCounter NumCols
CellText = ActiveDocument.Tables(1).Cell(RowCounter + 1, ColCounter
+ 1).Range.Text
CellText = Left(CellText, Len(CellText) - 1)
ActiveDocument.Tables(2).Cell(ColCounter + 1, RowCounter +
1).Range.InsertBefore CellText
ColCounter = ColCounter + 1
Wend
RowCounter = RowCounter + 1
Wend


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"eraksoy" wrote in message
...
How do you convert Table 1 to Table2 in Word 2003 or 2007?

No A B
1 Arrow Black
2 Air Berry
Table 1

1 A Arrow
B Black
2 A Air
B Berry
Table 2



  #4   Report Post  
Posted to microsoft.public.word.tables
eraksoy eraksoy is offline
external usenet poster
 
Posts: 2
Default Converting Rows to columns

Dear Herb,
Thanks for your solution. Is there a way to convert Table 1 exactly into
Table 2?
I used Transpose function. It helped but it did not sort the table like A, B
and then A,B

"Herb Tyson [MVP]":

Cheat. Copy it to Excel. Copy/paste special in Excel choosing the Transpose
option, then copy/paste it back into Word. :-)


--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
"eraksoy" wrote in message
...
How do you convert Table 1 to Table2 in Word 2003 or 2007?

No A B
1 Arrow Black
2 Air Berry
Table 1

1 A Arrow
B Black
2 A Air
B Berry
Table 2



  #5   Report Post  
Posted to microsoft.public.word.tables
Herb Tyson [MVP] Herb Tyson [MVP] is offline
external usenet poster
 
Posts: 2,936
Default Converting Rows to columns

I didn't study your 2nd table carefully before. I presumed because of the
subject line that you were transposing. Apparently not. Your example doesn't
swap rows and columns... it scrambles them, and the "to" table doesn't have
the same number of cells for each row:

1 A Arrow 3 cells
B Black 2 cells
2 A Air 3 cells
B Berry 2 cells


A and B both appear twice in the 2nd table, and "No" doesn't appear at all.
The two tables' symmetry doesn't match.

A very specific macro might be able to do it, but I don't believe that
Doug's macro would do it, either.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
"eraksoy" wrote in message
...
Dear Herb,
Thanks for your solution. Is there a way to convert Table 1 exactly into
Table 2?
I used Transpose function. It helped but it did not sort the table like A,
B
and then A,B

"Herb Tyson [MVP]":

Cheat. Copy it to Excel. Copy/paste special in Excel choosing the
Transpose
option, then copy/paste it back into Word. :-)


--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
"eraksoy" wrote in message
...
How do you convert Table 1 to Table2 in Word 2003 or 2007?

No A B
1 Arrow Black
2 Air Berry
Table 1

1 A Arrow
B Black
2 A Air
B Berry
Table 2




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data in columns i.o. rows Lupe Mailmerge 3 September 28th 07 12:18 AM
Deleting rows or columns Rufus Tables 2 July 28th 07 12:42 AM
Mailmerge using columns instead of rows tamee Mailmerge 2 March 28th 07 02:07 AM
'Tables'- 2 columns,4 rows. Can you merge one column into 3 rows? CalMac Captain Tables 1 May 19th 06 03:27 PM
convert columns into rows GreenEyedMedusa Tables 3 November 28th 05 07:50 PM


All times are GMT +1. The time now is 06:06 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"