Written by Allen Wyatt (last updated March 11, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
Irving created a chart and placed a text box on that chart. He also drew a line on the chart to serve as a reference for users. If he moves the chart, the text box and the line don't move with it. Irving wonders if there is a way to "lock" the text box and the line so that they move whenever he moves the chart.
There are two ways to approach this. First, you may want to consider how you are actually creating the text boxes and lines. If you select the chart before you create them, you'll notice that Excel makes some new tabs available on the ribbon. Click the Layout tab, and you'll notice an Insert Shapes group. You can select shapes and lines from these, and they become part of your chart and will move with it. (Use a rectangular shape in lieu of a text box; Excel allows you to add text inside the shape just as you would with a text box.)
If your text box and line are not part of the chart itself—if they can be moved outside the bounds of the chart by dragging them off the chart—then you can "lock" them in position by grouping objects. Follow these general steps:
At this point, all three items are grouped together and they move as a whole. You'll note that, after grouping, there is an "outer" border on the group that is a bit outside the original chart border. It is this outer border you'll need to click to select the group as you move it around.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (736) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Pie charts are a great way to graphically display some types of data. Displaying negative values is not so great in pie ...
Discover MoreIf you need to create a chart that uses logarithmic values on both axes, it can be confusing how to get what you want. ...
Discover MoreAdding labels to a chart can make the information presented in the chart more understandable. Excel allows you to add ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments