Changing the Color Inside a Shape

by Allen Wyatt
(last updated February 22, 2016)

4

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, and 2013.

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

Reversing Cell Contents

Macros are great at working with text. This tip presents an example that shows this versatility by reversing the contents of ...

Discover More

Finding the Lowest Numbers

Need to find the lowest numbers in a range of values? It's easy to do using the SMALL worksheet function, or you can use a ...

Discover More

Setting Program Window Size in a Macro

The macro programming language used in Excel gives you a great many tools that allow you to modify the way that Excel appears ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Pictures inside Shapes

Filling one of Excel's drawing shapes with a picture of your choosing is a neat trick. Here's how to do it.

Discover More

Drawing Lines

Excel doesn't limit you to only numbers and text in your worksheets. You can also add different types of shapes. Here's how ...

Discover More

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

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}] in your comment text. You’ll be prompted to upload your image when you submit the comment. 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 7 + 5?

2015-10-02 10:07:20

David

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
' Change object color when value in cell is changed

Dim Quantity As Double
Dim Color As Long ' variable for color based on cell value
Quantity = Range("I35").Value ' cell value changing object color
Select Case Quantity
Case Is <= 0: Exit Sub
Case 1 To 10: Color = vbRed
Case 11 To 20: Color = vbYellow
Case 21 To 30: Color = vbGreen
Case 31 To 40: Color = vbBlue
Case Is > 40: Color = vbBlack
End Select
ActiveSheet.Shapes.Range(Array("U-Turn Arrow 1")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.ForeColor.RGB = Color 'varible color value set in case statement
.Transparency = 0
.Solid
End With
End Sub


2013-05-13 08:42:30

Don

Mike...I think you are right, using VBA would be the way to go.

As to linking the color to the value of a cell, that would probably need to be done through the Worksheet_Change event, then using a Select Case for the color changes.


2013-05-11 08:29:52

Mike

I think you'd have to write some Visual Basic code to achieve this, because in effect you want to test the value of the cell to determine the colour to use. Cell colour is a property which can be set using a Visual Basic procedure. You might be able to do it using a macro, but the later versions of Excel actually use Visual Basic as the macro language.


2013-05-11 07:31:14

Mike

Is there a way to link the colour fill of a shape to a value generated in a cell so that if the value is 1- 10, the shape would be red, 11-20 = yellow, etc?


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.