Moving Objects with a Chart

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:

  1. Click on the text box to select it.
  2. Hold down the Shift key as you click on the line you added.
  3. Continue holding down the Shift key as you click the chart. (Best place is to click the border of the chart.)
  4. Release the Shift key. All three elements remain selected.
  5. Display the Format tab of the ribbon.
  6. In the Arrange group, click the Group tool and then choose the Group option.

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.

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

Determining an ANSI Value

You may need to determine the numeric value of a character in a macro. You can do that using the Asc function, described ...

Discover More

Understanding Underlines

Part of the formatting you can add to your text is underlining. That simple word (underlining) represents quite a few ...

Discover More

Understanding Color and Conditional Formatting Codes

When you create custom cell formats, you can include codes that allow you to set the color of a cell and that specify the ...

Discover More

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!

More ExcelTips (ribbon)

Printing a Chart Across Multiple Pages

Wouldn't it be great to have your huge charts print out on multiple pieces of paper that you could then piece together? ...

Discover More

Changing Y-Axis Label Width

Excel provides quite a bit of flexibility in how your chart looks. One of the least flexible places is in adjusting the ...

Discover More

Plotting Times of Day

Got a chart created from your worksheet? You can plot times of day in the chart if you apply the simple techniques in ...

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 two less than 9?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.