You add a shape or image to your Excel worksheet, but when you insert or delete rows, the object stays in place instead of moving with the cell it’s placed on. This happens because Excel has two different properties for positioning objects on a sheet. By default, shapes and pictures are not anchored to the cells beneath them. This article explains the property you need to change and provides the steps to lock your objects so they move and resize with their associated cells.
Key Takeaways: Locking Objects to Cells in Excel
- Format Object > Properties > “Move and size with cells”: This setting anchors an object so it shifts position and scales when you adjust rows or columns.
- Format Object > Properties > “Move but don’t size with cells”: This option lets the object move with cells but keeps its original dimensions unchanged.
- Right-click object > Format Object: This is the primary menu path to access the anchoring properties for any shape, picture, or text box.
How Excel Handles Object Placement and Movement
Every shape, image, or text box you insert into an Excel worksheet has positioning properties. These properties control whether the object is tied to the worksheet grid or floats independently. The default setting for most objects is “Don’t move or size with cells.” This means the object’s top-left corner is fixed to a specific point on the sheet, measured in points from the top and left edges. When you insert rows above it or columns to its left, the object does not change its absolute position.
The alternative is to anchor the object to the cells beneath it. When anchored, the object’s position and size are defined relative to the edges of the cells it overlaps. Changing the row height or column width will cause the object to stretch or shrink. Inserting or deleting rows and columns will push the object to a new location to maintain its relative placement. This behavior is essential for creating dynamic dashboards, forms, or reports where visual elements must stay aligned with specific data points.
Steps to Anchor Shapes and Images to Worksheet Cells
The process is the same for most object types, including shapes, icons, pictures, and text boxes. You must change the object’s properties through the format pane.
- Select the object
Click once on the shape, image, or text box you want to lock to a cell. Selection handles will appear around it. - Open the Format Object pane
Right-click the selected object and choose “Format Object” from the context menu. Alternatively, you can double-click the object or go to the Shape Format or Picture Format tab that appears on the ribbon. - Navigate to the Properties section
In the Format Object pane that opens on the right, click the icon that looks like a size and property sheet. It may be labeled “Size & Properties.” Then, click the arrow next to “Properties” to expand that section. - Choose the object anchoring option
You will see three options under “Object positioning.” Select “Move and size with cells” to fully anchor the object. This ensures it shifts and resizes with cell adjustments. Select “Move but don’t size with cells” if you only want it to change location without scaling. - Close the pane and test
Close the Format Object pane. To verify the setting works, insert a new row above the object or change the width of the column it is in. The object should now move or resize accordingly.
Anchoring Multiple Objects at Once
If you need to lock several shapes or images simultaneously, you can select them all before opening the format settings. Hold down the Ctrl key and click each object. Then, right-click any one of the selected items and choose “Format Object.” The property change you make will apply to the entire selection.
Common Mistakes and Limitations When Locking Objects
Object Disappears or Moves to Wrong Cell
If an object seems to vanish after you change rows, check its anchor point. The object is tied to the cells it overlapped when you set the property. If you cut and paste the object or move it dramatically after setting the property, it may re-anchor to a new cell range. Always position the object exactly where you want it relative to the cells before changing the property to “Move and size with cells.”
Objects in Grouped Charts or SmartArt Don’t Move
The anchor property typically applies to individual objects. Objects that are part of a grouped set, like a chart’s elements or shapes within a SmartArt graphic, inherit positioning from their parent container. You usually cannot anchor individual pieces separately. To make a chart move with cells, you must select the entire chart object and then set its properties to “Move and size with cells.”
Print Area and Page Breaks Ignore Anchored Objects
Setting an object to move with cells does not guarantee it will stay within a defined print area. If you set a specific print range and then insert rows, the object may move outside the printed area. You must manually adjust the print area again after modifying the worksheet layout to ensure all anchored objects are included.
Object Positioning Options Compared
| Item | Move and size with cells | Move but don’t size with cells | Don’t move or size with cells |
|---|---|---|---|
| Primary use case | Dynamic dashboards, forms where objects must stay aligned with specific data | Logos or decorative elements that should shift position but keep fixed dimensions | Fixed annotations, watermarks, or design elements that must stay in an exact sheet location |
| Behavior on row/column insert | Object moves and stretches/shrinks | Object moves to new location | Object stays in same absolute position |
| Behavior on row/column delete | Object moves and may shrink | Object moves | Object stays in same absolute position |
| Effect of filtering or hiding rows | Object moves if anchored rows are hidden | Object moves if anchored rows are hidden | No movement |
You can now reliably anchor shapes, pictures, and text boxes to specific cells in your worksheet. Use the Format Object pane and select “Move and size with cells” for dynamic reports. Remember that this setting is object-specific, so you must apply it to each element you want to lock. For advanced control, use the “Move but don’t size with cells” option for company logos that should stay a consistent size. Press Alt, then H, then O, then M to quickly open the Format Object pane using keyboard shortcuts.