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

Fixing Mismatched Bullets and Numbers

When you format bulleted lists or numbered lists, you may be surprised if some of the bullets or numbers don't match the ...

Discover More

Drawing Lines

Lines are one of the most common graphic elements to be added to documents. Here's how you can add the lines you want.

Discover More

Keeping a Replace Operation Displayed

The Find and Replace tool is designed to help you find and replace information as quickly as possible. However, you may ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Moving a Table Row

Want to move a row in a table very easily? You can do so by using the same editing techniques you are already using.

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

Freezing a Table

Tired of Word changing the dimensions of table cells to accommodate what you place in those cells? You can instruct Word ...

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 8 - 5?

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.