# Section 19.3. Drawing Shapes

### 19.3. Drawing Shapes

If the stock graphics provided in the clip art collection don't satisfying your inner art critic, you can create your own pictures. Excel's drawing features make this process a lot easier than you might expect. In fact, you can create everything from simple shapes to complex art without leaving your worksheet.

The starting point for all drawing activity is the ribbon's Insert Illustrations Shapes section, which is filled with potential shapes (Figure 19-12).

 Figure 19-12. Depending on how large your Excel window is, you may see a few shapes in the Insert Shapes section. But if you click the drop-down arrow, you get a complete list, subdivided into logical sections.

Before you can really get started drawing anything, you should understand the basic shape categories. They include:

• Lines . This category includes straight lines, curved lines, and arrows.

• Rectangles . Albeit ordinary, rectangles are great for storing bits of text or just wrapping themselves around groups of other shapes.

• Basic Shapes . This category includes geometric shapes like the square, circle, rectangle, octagon, and more. Leave it to Microsoft to also include not-so-basic shapes like rings, lightning bolts, suns, moons, and even a happy face.

• Block Arrows . This category includes a variety of one-way and two-way arrows, as well as shapes with arrows attached to them.

• Equation Shapes . This category includes large mathematical symbols, like the multiplication, division, and equal signs.

• Flowchart . This category includes shapes that are often used in flowcharts, like the rectangle (which represents a step in a process) and the diamond (which represents a decision).

• Stars and Banners . This category includes the common five-pointed star and other starburst shapes. It also includes different types of banners, like award strips and unfurled scrolls . These shapes look best if you put some text inside them.

• Callouts . Callouts are designed to add information to a worksheet. Most Excel callouts are shapes with a connected line. The line points at something important, and the shape contains any descriptive text you want to write.

Note: These shapes are featured in most Office applications. Once you learn to use them in Excel, you can also use them in the same way in Word or PowerPoint. This fact also explains the existence of some of the shapes that don't make much sense in Excel spreadsheetsthey're really intended for other Office applications.

#### 19.3.1. Drawing a Shape

Excel lets you draw a wide range of shapes, from simple lines and circles, to banners and three-dimensional arrows. To insert a new shape, follow these steps:

1. Find the shape you want in the Insert Illustrations Shapes section, and then click it .

2. Note: The Drawing Tools Format tab is a lot like the Picture Tools Format tab you learned about earlier. It includes similar buttons for applying borders and effects, and arranging and resizing your shape.
3. Pick a color for your shape from the Drawing Tools Format Shape Styles Shape Fill list .

This color fills the inside of all shapes except for lines. You can also choose No Fill to make the shape transparent so that other shapes (and your worksheet data) show through. You can use a circle with no fill to point out some important data on your worksheet, for example.

Along with the standard color choices, you can also use a fancy texture, an existing picture, or a gradient. In fact, shapes offer exactly the same options that you saw when you colored in chart elements (Section 18.4.2.1).

4. Pick a border color, thickness , and dash style from the Drawing Tools Format Shape Styles Shape Outline list .

To pick a shape border, you follow the same process you did to add a border to an ordinary picture from a picture file (Section 19.2).

5. If you want a fancy shape effect, like shadow or 3-D rotation, choose the effect from the Drawing Tools Format Shape Styles Shape Effect list .

The effects that you can use with shapes are mostly the same as the effects you can use with pictures (although they usually make more sense with shapes). They include:

• Reflection adds a faint copy of part of the image just under the bottom edge, as though it's being mirrored in a pool of water or piece of shiny glass.

• Glow adds a blurry edge in a color you choose.

• Bevel shapes the surface of the image so that part of its surface appears raised or indented.

• 3-D Rotation turns the image around in three dimensions. This trick works best with images that have some depth to themthe thick block shape is a better choice than the flat square.

• Preset lets you choose from some ready-made options that combine more than one effect.

 Figure 19-13. This eye-catching arrow sports a thick white border, gradient fill, and shadow.

Tip: If you don't want to pick a separate fill color, border, and effect, you can use one of Excel's preset styles. Just make your choice from the gallery of options (each of which has a tiny thumbnail preview) in the Drawing Tools Format Shape Styles section of the ribbon.

Now that your shape is perfected, you can drag it to the position you want, and then resize it .

When you select a drawing, Excel not only displays the usual resize handles, but it also gives you one or more yellow diamonds and a green circle, as shown in Figure 19-14. You can drag the green circle to rotate the image. You can use the yellow diamonds to change the proportions on the shape. You can change the amount of curve in a curved banner, the width of each point in a star, or the length of a line in a callout. As you drag, Excel superimposes a light copy of the shape to indicate how the shape will change.

 Figure 19-14. Look for a drawing's yellow diamonds, which let you alter the shape in all kinds of weird and wonderful ways. Different shapes support different types of alterations.

 POWER USERS' CLINIC Hard-Core Shape Manipulation If you're feeling very punk rock, you can make dramatic changes to a shape in Excel. In fact, Excel lets you edit a shape like it's a diagram in an illustration program. To do so, select the shape, and then choose Drawing Tools Format Insert Shapes Edit Shape Convert to Freeform. Although your shape still looks the same, this action changes it to a collection of straight lines, curves, and points. You can now modify each point. First, choose Drawing Tools Format Insert Shapes Edit Shape Edit Points to show the points on the shape. Then you can drag a point to move it somewhere else. As you move the point, Excel "pulls the rest of the shape along with it. Drag a few points and you can take an ordinary shape like an arrow and transform it into a strangely distorted blob. Most people find that this feature is an effective way to ruin a perfectly good shape. But your art skills could make the difference in improving a design.

#### 19.3.2. Adding Text to a Shape

You can add text to almost any shape. It doesn't matter whether you've got a circle, a box, an arrow, a banner, a starburst, or even something weird. Shapes that don't have any interior space, like lines, are the only exceptions.

When you add text to a shape, the text wraps itself to fit neatly inside. Figure 19-15 shows a few examples.

 Figure 19-15. All these shapes share one thing in common: they contain descriptive text. Used creatively, text and shapes can add a little life to your worksheets.

1. Right-click the shape, and then choose Edit Text .

Your cursor moves inside the shape, and a box appears around the current text, if there is any.

You can also just click the shape, and then start typing, without bothering to choose Edit Text.

Tip: If you want to add floating text that isn't inside a shape, choose Insert Text Text Box, draw the text box somewhere on your worksheet, and then start typing. Or, use one of fancy presets from the Insert Text WordArt gallery if you want to add a text box that already has some wild formatting in place.

Type the text you want to use .

2. If you want to format your text, use the mini formatting bar or the buttons on the Drawing Tools Format WordArt Styles section of the ribbon .

To use the mini bar to make basic formatting changes, select the part of the text you want to change, and then choose a new font, size , color, and so on from the small toolbar that appears just above.

To use the WordArt feature to apply eye-catching effects, select the whole shape, and then head to the ribbon's Drawing Tools Format WordArt Styles section. Youll find buttons that let you independently apply a fancy fill, border, and various effects. You've already used these features with shapes and pictures. Or, you can choose a ready-made combination of formatting settings from the Drawing Tools Format WordArt Styles Quick Styles list. Figure 19-16 shows a shape with some WordArt-enhanced text.

 Figure 19-16. This text uses a dazzling reflection effect to distract spreadsheet readers from abysmal sales numbers elsewhere in the worksheet.

Note: Unfortunately, there's no way to put a cell reference into the text in a shape. If you could, shapes would be a whole lot more useful, because they could pull current information out of your worksheet (like the actual sales totals). This feature is under close consideration for future versions of Excel, but it didn't make the cut this time around.

#### 19.3.3. Selecting and Arranging Shapes

If you add enough shapes, you may start to run into trouble manipulating and layering all these different objects. Here are some potential headaches you could face:

• Some shapes are difficult to select . If you don't click exactly on a line, you end up selecting the worksheet cell underneath the line.

• Some shapes may obscure other shapes . What if you want to put a starburst shape inside a circle? Depending on the order in which you've added the shapes, when you move the starburst over the circle, it could actually disappear underneath the circle.

Excel has a handy tool to help you out. It's called the "Selection and Visibility" pane (shown in Figure 19-17), and you call it into action by choosing Page Layout Arrange Selection Pane. Or, if you have a shape thats currently selected, you can get the same feature using the Drawing Tools Format Arrange Selection Pane command.

The "Selection and Visibility" pane lets you do two things: select difficult-to-reach objects, and change the way they're layered.

 Figure 19-17. The "Selection and Visibility" pane lists all the floating objects you've added to your worksheet. These objects include shapes, pictures, text boxes, and charts. The name is determined by the shape type, and the sequence in which you added it. The 10th text item you add may have a name like TextBox 10. For pictures, you see the word "Picture," and for charts you see whatever name you set in the ribbon's Chart Tools Layout Properties Chart Name box.

To select an object, simply click it in the list. This method works even if your shape is buried underneath another shape and therefore impossible to click with the mouse. Once you've selected your shape, you can move it, resize it, or format it using the ribbon.

Tip: To quickly jump from the currently selected shape to the next shape, just press Tab. The resizing handles appear around the currently selected shape. You can also use Shift+Tab to move back to the previously selected shape.

Sometimes, you'll want to select several shapes at once. To do so, just hold down the Ctrl key while you click each shape in the list. Once you've selected several shapes, you can move or format them as a group . You still use the ribbon in the same way, but now your changes affect every selected shape.

Tip: If you plan to use a group of shapes as a single unit, you can group them together. When you do so, Excel treats them like one shape object when you select or move them. To group shapes, select them all, and then choose Drawing Tools Format Arrange Group Group. The only disadvantage to having a grouped shape is that you cant modify the individual shapes separately unless you first choose Drawing Tools Format Arrange Group Ungroup to remove the grouping.
layering in your worksheet (the way that different images overlap one another). Technically, each image on your worksheet exists in its own private layer. Whenever you add a new shape, Excel creates a new layer at the top of your worksheet, and then puts the new shape in this layer. That means new objects are layered on top of older oneswhich may not be what you want.

To change the way Excel layers objects, you need to change the order of items in the "Selection and Visibility" list. Objects at the top of the list appear on top of other objects further down the list (Figure 19-18). To move an item, select it, and then click the up or down arrow button. Figure 19-19 explains how to create transparent shapesgood for when you want the cells beneath your shapes to remain visible.

 Figure 19-18. In this example, the apple (Picture 5) appears on top of the happy face (Smiley Face 3) because it's higher in the list.

 Figure 19-19. You can use the No Fill option (Section 19.3.1) to create a transparent shape that shows the data or shape underneath, as with the starburst shown here.

Note: You can also change the layering order using the "Bring to Front" and "Send to Back" buttons in the ribbon's Drawing Tools Format Arrange section. However, the "Selection and Visibility pane is much easier to use.

If you have an extraordinarily complex worksheet that's dense with shape objects, you may find that it helps to temporarily hide the ones that you aren't interested in. There are two ways to do this:

• To hide everything , click the Hide All button in the "Selection and Visibility" pane. Now, whenever you click to select an image in the list, it appears. When you're done making your changes and you're ready to see all your shapes again, click Show All.

• To hide just a few items , click the eye icon next to each item in the "Selection and Visibility" list. Click the eye again to make the item reappear (or use the Show All button to show everything).

 TIMESAVING TIP Lining Up Shapes When creating a complex piece of Excel art (like a diagram that's entirely made up of shapes), you need a way to line up shapes with exact precision. Simply dragging each shape into place with the mouse may be too difficult or just take too long. Happily, Excel has an automatic alignment feature that can really help you out. To use Excel's alignment feature, begin by selecting all the shapes that you want to line up. (Hold down the Ctrl key, and then select each one on your worksheet or in the "Selection and Visibility" pane.) Then, make a choice from the Drawing Tools Format Arrange Align section of the toolbar. You can line up shapes along their left, right, top, or bottom edges, or center them so their mid-points line up. And if youve selected more than two objects, you can use the Distribute Horizontally and Distribute Vertically commands to space them out evenly, with a consistent amount of space between each shape.

#### 19.3.4. Connecting Shapes

On the one hand, you may have noticed that the shapes in the Lines category are perfect for connecting other shapes. The creators of the Office shape-drawing model also recognized this fact, and they made it easier for you to snap your lines into place.

On the other hand, you may be wondering if there's really any point to connecting two shapes. Why not just drag your line anywhere on the border of a nearby shape? After all, even if you don't hit a connection point, it still looks like your line is connected to the shape. Connections' real benefit appears when you move the connected object. Imagine you have a line that links together two squares. If you've used connections, when you drag one of the squares to a new place, the line follows . If you haven't used connections, you have to move the square, and then resize the line every time.

Here's how to connect shapes. Every shape has predefined connection points , which are ideal places where you may want to connect a line. A basic rectangle has four connection pointsone in the middle of each sideand a typical circle has about eight, arranged in even intervals along the border. To use the connection point feature, you simply click to select a line, and then drag one end over another shape. As you get close, Excel shows you all the connection points using small red squares (see Figure 19-20). When you drop the line in one of these places, you've created a connection.

 Figure 19-20. As you drag the line with the arrow over this callout (Section 19.3.1), Excel shows the possible connectors.

Connections let you take separate shapes and build more impressive diagrams. When you use connections, you may also want to consider using grouping (Section 19.3.3). And if you don't want to connect everything on your own, you may be interested in the SmartArt feature (discussed in Section 19.3.5), which gives you pre-made diagrams that include numerous shapes and connecting lines.

 GEM IN THE ROUGH Drawing Graphic Objects in Charts You may find that shapes are more trouble than they're worth because they can quickly gunk up a worksheet. But graphic objects become extremely useful in one area: your charts. With the right shapes, you can break out of Excel's limiting rules for labeling and highlighting data and add eye-catching arrows and shapes. Excel lets you draw on a chart object in the same way that you draw on a worksheetusing the tools found on the Insert Illustrations section of the ribbon. Best of all, once you draw a shape in a chart box, it stays locked into that box. That means if you move the chart, the shape follows along, remaining in the appropriate position. Figure 19-21 demonstrates some of these techniques. Here are a few ways that Excel's drawing features can enhance your charts: Use arrows to point to important places on a chart. This technique works well if you need to highlight a single data point. Use circles or squares around an important region on the chart. This technique works well if you need to highlight a section containing multiple data points. Use callouts to add descriptive text explaining why a chart line takes a sudden dive or turns upward suddenly. Add picture objects, like logos or a themed background (for example, show a picture of a beach in a chart that tracks favorite vacation destinations).

 Figure 19-21. This chart features half a dozen graphical elements. A logo floats in the top-right corner, while a starburst announces the results in the bottom-right. A callout points to a sudden change in the data, and a combination of a textbox, arrow, and ring highlights where the two lines cross.

#### 19.3.5. SmartArt

SmartArt is a new feature that lets you create business graphics and place them in your Excel worksheet. Figure 19-22 shows a few examples of SmartArt diagrams.

 Figure 19-22. You can use SmartArt graphics to show a company's organizational structure (top left), a sequence of steps (top right), a pyramid of good eating choices (bottom), and much more.

SmartArt and Excel have a slightly awkward relationship. Although the SmartArt graphics are unarguably attractive (and easy to build), they don't make sense in most Excel workbooks. After all, most people expect to use Excel to record reams of numbers, and analyze them with number- crunching formulas and sophisticated charts. Diagrams make more sense in the company report (a Word document) or a budget presentation (a PowerPoint document). Truthfully, you're more likely to use SmartArt in both these programs than in Excel.

Furthermore, SmartArt diagrams have the same fundamental limitation that all shapes have in Excelyou can't use cell references as part of your text. That means if you need to have summary numbers or the result of a complex calculation in a SmartArt diagram, you need to copy the values yourself (and remember to update them when the value changes in the worksheet).

Even with all these considerations, SmartArt can still help you create a professional-caliber diagram in a hurry.

Here's how to create a SmartArt diagram:

1. Choose Insert Illustrations SmartArt .

The "Choose a SmartArt Graphic" dialog box appears (Figure 19-23).

 Figure 19-23. You can choose from a gallery of about 80 diagram types.

2. Choose the diagram you want to use, and then click OK .

The Text pane appears where you can enter the text that's presented in the diagram (Figure 19-24). If the Text pane doesn't appear automatically, choose SmartArt Tools Design Create Graphic Text Pane.

 Figure 19-24. You don't need to fiddle with individual shapes to create a SmartArt diagram. Instead, you type in everything you need in a special Text pane (shown here on the right). Excel uses this text to create the diagram.

When you're finished, drag your diagram into place, and then resize it as you see fit .

Once you've created a diagram, you can format and fine-tune it much the way you format shapes. First, select your SmartArt graphic, at which point two new tabs appear in the ribbon: SmartArt Tools Design and SmartArt Tools Format.

Here are some tricks you may want to try out:

• Make a choice from the SmartArt Tools Design Layouts gallery to switch to a different type of diagram. Excel automatically transfers the text you entered to the new diagram.

• Make a choice from the SmartArt Tools Design SmartArt Styles gallery to apply different color, border, and shape effects.

• Click one of the shapes inside the SmartArt graphic (like a single text box). You can then format it differently so it stands out from the rest using the Smart Tools Format tab. Among the changes you can make, include changing the type of shape, applying WordArt effects, and moving or resizing the shape.

• Choose Smart Art Tools Design Reset Reset Graphic to clear your formatting and return everything to normal. The list of points and subpoints that youve typed in remains.

Excel 2007[c] The Missing Manual
ISBN: 596527594
EAN: N/A
Year: 2007
Pages: 173