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

Header and Footer Formatting Codes

When creating headers and footers in an Excel worksheet, you can use special codes to add or format information. This tip ...

Discover More

Changing Cell Alignment

Individual cells in a table can be aligned any way you desire. As pointed out here, just select the cell and apply the ...

Discover More

Copying Rows between Worksheets Based on a Text Value

Want to move data from one worksheet to another based on a text value in a column. There are a couple of ways you can ...

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)

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

Quickly Inserting Table Rows

Need to pop a few extra rows into a table? It is easy to do using the same tools you used to create the table in the ...

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 6 - 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.