Changing the Color Inside a Shape

Written by Allen Wyatt (last updated February 21, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


5

When you have created a drawing object, you can fill it with a color of your choosing. This is easy to do by following these steps:

  1. Select the shape you want to fill.
  2. Make sure the Format tab of the ribbon is selected.
  3. In the Shape Styles group, click the Shape Fill tool. Excel displays a color menu.
  4. From the color menu, select the color you want to use.
  5. If you do not see your desired color displayed, click on More Fill Colors to display a wider selection of choices.

Once you select a color, Excel removes the color menu and fills the interior of the shape with the color selected. To remove a color you previously used, you can repeat the same steps, but in step 4 choose No Fill.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6611) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

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

Protecting Formulas in Control-Linked Cells

Form controls can be a great way to get information into a worksheet. They are designed to be linked to a cell so that ...

Discover More

Comma-Delimited and MS-DOS CSV Variations

Excel provides different file formats you can use to export your worksheet information. One such file format is CSV, or ...

Discover More

Copying Rows and Columns with the Mouse

Word allows you to do quite a few editing tasks using the mouse. If you want to copy rows or columns in a table, you can ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Changing the Size of a Drawing Object

Add a drawing object to your worksheet, and at some point, you may want to change that object's size. You can easily ...

Discover More

Selecting Drawing Objects

Excel allows you to create all sorts of drawings using a wide assortment of tools. When you need to take an action upon ...

Discover More

Filling a Drawing Object

Want to add some spice to the graphics in your worksheets? There are many colors and effects in Excel that allow you take ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, 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 five minus 5?

2023-05-21 10:56:08

Tomek

Chandru,
What you created is not an actual single shape, but just four separate objects. You can format each of them, but not an area between them, as that area is not an object. Even if you group the four lines to be treated as one entity, what is between them is not part of any object. Hence, you have to create another object that is positioned exactly to match position of your lines, then fill that object with the colour of your choice. You may want to move that object behind the lines so that they are fully visible.
In short, it is easier to use one of many available shapes, in your case a rectangle, then format the outline and inside of that shape.
The only situation I can imagine that four lines would be useful is if you want each side of the shape to have different colour or other attributes (thickness, line-type, etc.). In such case I suggest creating the shape (rectangle) first, then creating the lines to match. That way the lines will be in front of the shape and fully visible.


2023-05-21 09:00:28

Peter Atherton

Chandru

You will already have the values for each line Top-Left, Top-Right etc. You can use the FreeForm shape in the Lines section, 2nd from right.

I recorded this macro to insert a triangle, drawn by clicking on each end point.

Sub FreeForm()
'
With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 95.25, 135.75)
.AddNodes msoSegmentLine, msoEditingAuto, 96, 210
.AddNodes msoSegmentLine, msoEditingAuto, 192, 210.75
.AddNodes msoSegmentLine, msoEditingAuto, 95.25, 135.75
.ConvertToShape.Select
End With
End Sub

(see Figure 1 below)

It starts with size on screen and adds nodes for each end point and the last node equals the startpoint. If your shape is part of a chart then, I imagine, the nodes are the x,y co-ordinates on the chart.

Good luck with that ;-)

Figure 1. 


2023-05-20 11:29:18

James Woolley

@rudolf
If your active sheet has an ActiveX control named CB_Dropdown1, this will change its BackColor to yellow:
ActiveSheet.CB_Dropdown1.BackColor = RGB(255, 255, 0)


2023-05-19 06:45:50

rudolf

Hello,

when I select one of my dropdown shapes, I then find mostly all options greyed out on the Format ribbon tab and I'm not able to change the background color or else.
Is there an option to enable/disable this somewhere?

I'm using Excel 2013, the shapes where added using the Active-X Controls toolbox.
Registered a macro just to be shure and it shows me "ActiveSheet.Shapes.Range(Array("CB_Dropdown1")).Select".

Tried to change the BackColor via VBA (this is what I really want to do) but no luck at all and stumbling around I found your tip and noticed that for my dropdown shape most of the format options are greyed out. So maybe there's a possibility to resolve?

Hopefully,
Rudolf


2020-03-19 02:07:07

Chandru

Thanks for the tip. If a different object is created by individual line shapes, how can we fill color inside that object? For example, I have created a rectangle using four line shapes instead of rectangle shape from the tool, and my concern is I need to fill the rectangle created by 4 line shapes.


This Site

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

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, 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.