Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Transposing Table Contents.

Transposing Table Contents

Written by Allen Wyatt (last updated January 22, 2022)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021


1

If you are working with tables in a document, at some point you may find it helpful to transpose the contents of the table, so that rows become columns and columns become rows.

There is no way to do this in Word. There is, however, a way to transpose rows and columns in Excel. So, the typical method of accomplishing this task is to use both Word and Excel, using these general steps:

  1. Create your table in Word.
  2. Select the entire table and copy it to the Clipboard.
  3. In Excel, use Paste Special to paste the table as Text.
  4. Using Excel, transpose the rows and columns. (How you do this can be found on the ExcelTips site.)
  5. Copy the transposed table to the Clipboard.
  6. Paste the table back into Word.
  7. Format the pasted table as desired.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9078) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Word here: Transposing Table Contents.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using a Single Password for Multiple Workbooks

While password protecting a workbook does provide some security for the contents in the workbook, if you have several ...

Discover More

Tab Key Won't Move from Cell to Cell in Locked Worksheet

Normally the Tab key can be used to move from one cell to another in Excel. If this cell movement doesn't work for you, ...

Discover More

Controlling Names of Backup Files

Want to control the name and location of your document backup? Here are some ideas that may help.

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Setting Consistent Column Widths in Multiple Tables

Tables are great for organizing and presenting information in a document. If you have a document containing multiple ...

Discover More

Converting a Table into Text

Word includes a powerful table editor that allows you to create and work with tables easily. At some point, however, you ...

Discover More

Moving Rows and Columns with the Mouse

Like to use the mouse to help you with your document editing? You can move table rows and column with the mouse by using ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four minus 0?

2022-01-24 09:52:41

Andrew

Funny, I just had the need for this functionality just the other week, so I "hocked up" this macro to create a "transposed" table in a separate document. This is highly not robust, and could have some error checking, but that was taking me down a rabbit hole I didn't have time for.

Andy.

Sub TableTranspose()
' Rotates columns to rows and vice versa
Dim OriginalTable As Table
Dim TransposedTable As Table
Dim NewDoc As Document
Dim a As Long, b As Long

Set OriginalTable = Selection.Tables(1)
Set NewDoc = Documents.Add
Set TransposedTable = NewDoc.Tables.Add(NewDoc.Content, OriginalTable.Columns.Count, OriginalTable.Rows.Count)

For a = 1 To OriginalTable.Rows.Count
For b = 1 To OriginalTable.Columns.Count
TransposedTable.Cell(b, a).Range.Text = OriginalTable.Cell(a, b).Range.Text
Next b
Next a

TransposedTable.Select
End Sub


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.