Easily Copying Cell Formatting

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

Barry is often sent documents with manually applied shading in some of the table rows and he needs to apply the exact shading elsewhere. For other formatting he would probably use the Format Painter but, alas, it only copies the formatting of the text, not of the cell. Barry wonders about the easiest way to copy cell formatting from one place to another.

As far as I've been able to determine, there is no shortcut within Word that allows you to copy table cell formatting from one cell to another. You can, if you want, use the tried and true "repeat the last action" technique:

  1. Select the cell you want to format.
  2. Apply formatting to the cell.
  3. Select one or more other cells.
  4. Press F4.

This works because pressing F4 repeats the previous action you took in the document. Since the previous action was to apply some formatting to a cell (step 2), pressing F4 applies that same formatting to the other cells you selected in step 3.

This can get a bit tedious, though. A better way might be to create a macro to copy the formatting. Since Barry is dealing specifically with cell shading, I'll provide a macro that focuses just on that. Actually, there are two macros here:

Dim lbgc As Long

Sub SetColor()
    If Selection.Information(wdWithInTable) Then
        lbgc = Selection.Cells(1).Shading.BackgroundPatternColor
        MsgBox "Insertion point is not in a table."
    End If
End Sub
Sub ApplyColor()
    Dim c As Cell

    If Selection.Information(wdWithInTable) Then
        For Each c In Selection.Cells
            c.Shading.BackgroundPatternColor = lbgc
        Next c
    End If
End Sub

Note several things about these macros. First, you can see that a variable (lbgc) is defined outside of any of the macros. This is because the variable is used in both the SetColor and ApplyColor macros.

The SetColor macro is used to specify the background color you want to paste elsewhere. All you need to do is to place the insertion point within a table cell and then run the macro. It takes the background color and places it in the lbgc variable. If you select multiple cells before you run the macro, then it only uses the background color from the first cell in your selection.

Now you can select any other cells you want and run the ApplyColor macro. It takes the value stored in lbgc and applies it to the background in every cell you selected.

If you assign shortcut keys to these macros (or add them to your Quick Access Toolbar), then you can easily copy background shading from one cell to any number of other cells you desire.

As I said, these macros deal only with background color because that was the issue being faced by Barry. There are other table cell formatting elements that could be saved and copied using the same technique—just define the storage variables outside of the macros, save the values in the SetColor macro, and then apply the values in the ApplyColor macro.


If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12881) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021.

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


Grouping Drawing Objects

Drawing objects are easily added to a document. You can group these objects so they are easier to manage by following the ...

Discover More

Shortcut for Selecting a Data Range

Want to select all the data in a contiguous section of a worksheet? The shortcut discussed in this tip makes it very easy.

Discover More

Fast AutoFill

Want to fill a long column with predictive data? It's easy to do by using AutoFill and a double-click of the mouse.

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Getting Rid of Background Color in All Tables

When working with tables (particularly those created by others), you can spend a large amount of time getting the ...

Discover More

Shading Table Rows

Need to format the rows of a table so that your data is showcased better? Here are a few ways you can get the shading you ...

Discover More

Underlining Cells, Not Space Between Cells

Word provides a couple of ways you can underline information, including underlining table cells and their contents. ...

Discover More

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

View most recent newsletter.


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 five more than 6?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

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.


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.