Copying Fill Color in a Table
Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. 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: Copying Fill Color in a Table.
April has a table in her Word document. One row is formatted with a custom color fill to match the company's logo color. April now wants to copy that fill color to other rows. She was hoping to use the Format Painter, but that just copies the text format, not the fill color used in the table cells. April wonders if there is a way to copy the fill color from one row to another.
There are a few ways that you can approach this issue. One is to simply use the tools that are available in Word. Follow these steps:
- Select the row that is already filled with the desired color.
- Display the Design tab of the ribbon.
- Click the down-arrow to the right of the Shading tool, in the Table Styles group. (The tool looks like a spilling bucket of paint.) Word displays a palette of colors.
- Click on More Colors. Word displays the Colors dialog box. (See Figure 1.) The color of the selected row should already show in the dialog box.
Figure 1. The Colors dialog box.
- Click OK. (Note that you made no changes in the dialog box; you just clicked OK.)
- Select the other rows in the table whose background color you want to change.
- Click on the Shading tool on the Design tab of the ribbon. Your desired color is applied to the selected rows.
After you apply the desired color, if you want to apply it elsewhere (perhaps in another table or in some cells you missed), all you need to do is select the cells and press F4. The shading is repeated on the selected cells.
If you need to do this quite a bit with a number of tables or in a number of documents, you may want to consider using a macro to do the shading. A handy little macro is the one below:
Dim backColor As Long
Dim foreColor As Long
If Selection.Information(wdWithInTable) Then
backColor = .Cell(1, 1).Shading.BackgroundPatternColor
foreColor = .Cell(1, 1).Shading.ForegroundPatternColor
.Shading.BackgroundPatternColor = backColor
.Shading.ForegroundPatternColor = foreColor
MsgBox "Put the insertion point in a table"
The macro shades an entire table based on the shading used in the first cell of the first row of the table. All you need to do is make sure you place the insertion point somewhere within the table before running it. This macro is a variation of the macro mentioned at the following website:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10932) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Copying Fill Color in a Table.
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!
Leave your own comment:
Comments for this tip:
anita 28 Oct 2016, 03:32
very useful tip
Joan Milton 06 Sep 2016, 07:54
Thank you. Trying to colour fill cells was driving me crazy!
Bill 04 Sep 2016, 22:56
For filling in the entire cell, highlight the desired cell(s), then, in the Home, go to the Highlight button (little "ab" with a slanted highlighter pen), and choose a color. This highlights the ENTIRE cell. THen you can choose a different font color to see the words better, if needed.
Jean 24 Jun 2016, 12:52
@madhava That would be in Excel -'Conditional Formatting' --> Highlight Cell Rules --> Text That Contains... Create as you wish, then paste it into Word retaining formatting.
madhava 20 Jun 2016, 07:36
I have a requirement like I have do color change based on Yes / No condition,.if yes then one color , if no one color, is there is any code ?
email@example.com 17 Jan 2016, 03:35
Very good.But what about borders?
Josh M 02 Nov 2015, 06:51
This method completely slipped my mind. Thanks again!
Ursula 27 Oct 2015, 14:03
I just wanted to say thank you! This tip is immensely helpful. Bookmarking your site now :)
Alison 08 May 2015, 06:32
Thank you. So simple (when you know how!) Saves time too. :)
alvaro 07 Jan 2015, 10:40
before i read this tip it was impossible to me to know exactly the color source cells had, the steps described here let me set just the same color without any doubt, thanks a million
AA 05 Dec 2014, 04:59
The borders and shading method works.
Sean 04 Sep 2014, 16:17
Krishna V 31 Jul 2014, 02:10
@RJ Steele, I just came across your problem and you'd probably have moved on from this or figured a way out. But I'll tell you the solution I found for this anyway.
To figure out the colour, you can right click the cell which has the colour you want, go to Borders and Shading and then further click the Shading option. Inside you will find the colour you are looking for, click it and go to more colours, which gives you the exact combination of R, G and B. Once you have used it, you will find the relevant colour under recently used colours.
I hope that solves your problem. :)
Leonardo 23 Jul 2014, 22:05
Thank you, grood job!
Exotic Hadron 08 Jul 2014, 13:17
Thanks for the wonderful tip! Who'd guess that reapplying what is already applied would set the applied color to the button state.
Although it looks natural once you know that (at least all coloring controls change their color to the one used recently), it's not as easy to figure this.
RJ Steele 02 May 2014, 10:24
Sorry, but the selected color does NOT appear in the dialog box after the document has been closed and later re-opened. The dialog box shows black. I can find no way to identify the color that was earlier used, so to copy it, etc.
Alistair Christie 17 Jan 2012, 14:53
Thanks. I couldn't find that anywhere else. It amazes me that Microsoft haven't fixed this and many other bugs with tables in Word. It makes no sense that you can't use the Format Painter to apply the background colour from one row to another. Anyway, this is at least a workaround. Thanks again.
David Ryan 14 Nov 2011, 13:36
Happy days. This has bugged me for ages. What's even better is the same tip works in Excel 2007.