Almost every guide to this problem gives you the same one-line answer: tick Move and size with cells in the picture properties. That advice is correct and it is also incomplete, which is why so many people apply it and then watch their images pile up at the top of the sheet the moment they filter. The setting is necessary. It is not sufficient. The part nobody mentions is the bit that actually decides whether sorting and filtering work.

Let’s fix it properly.

The three options, and what each one really does

Right-click any picture, choose Size and Properties (or Format Picture on older versions), and expand the Properties section. You’ll see three radio buttons:

  • Move and size with cells — the image is glued to the cells beneath it. Resize a column or row, and the picture stretches or shrinks with it. Filter or sort, and it travels with its row.
  • Move but don’t size with cells — the picture follows the cell when rows above it are inserted or deleted, but keeps its own dimensions when you resize the cell. This is the default for a floating image, which is exactly why your pictures aren’t behaving.
  • Don’t move or size with cells — the picture is anchored to the worksheet, not the data. It stays put no matter what happens to the cells around it. Useful for a logo in a header; useless for images that belong to rows.

For images that should track their data through sorts and filters, you want Move and size with cells. So far this matches the standard advice. Here’s where it stops matching.

Why the setting alone doesn’t fix filtering

Setting “Move and size with cells” makes the image belong to a cell. It does not make the image fit the cell. And filtering only works correctly when the picture is fully contained within its cell’s borders.

If any part of the image overlaps into the cell below — even by a pixel — Excel can’t cleanly associate it with a single row. When you filter, the overlapping images don’t collapse with their hidden rows. Instead they bunch up, stacking on top of each other at the top of the visible range. This is the “images piled up after filtering” problem, and people blame the anchor setting when the real cause is that their pictures are slightly too big for their cells.

The fix is unglamorous: make each image genuinely smaller than its cell. Resize the rows and columns so every picture sits entirely inside its boundaries with a little margin. Counterintuitively, some users find that even with “Move and size with cells” checked, manually shrinking the image to sit comfortably inside the cell is what finally makes sorting reliable — the containment matters more than the checkbox.

If you’re working with a handful of images this is a two-minute job. If you’re working with hundreds, doing it by hand is a punishment, so let’s deal with that.

Setting every image at once

You do not have to open Format Picture for each picture individually. Click any one image to select it, then press Ctrl+A. Excel selects every object on the sheet. Now open Size and Properties and set Move and size with cells once — it applies to the whole selection.

For more control, open the Selection Pane (Home → Find & Select → Selection Pane, or Alt+F10), which lists every object on the sheet so you can pick exactly the ones you want before changing their properties. This is the better choice when your sheet mixes pictures with charts, shapes, or form controls that you don’t want reanchored.

There’s a VBA route too — a short loop that sets Placement = xlMoveAndSize on every shape — and for genuinely large, frequently-rebuilt sheets it’s worth keeping in your back pocket. Several people who’ve fought this problem report the VBA approach behaving more consistently than the manual checkbox, which itself tells you how flaky the manual setting can be on big datasets.

The bug worth knowing about

There’s a recurring Excel defect that wastes a lot of time because it looks like a settings problem when it isn’t. If you filter a list of images and then delete several non-consecutive rows at once, the remaining images can distort or vanish when you remove the filter — even with every picture correctly set to “Move and size with cells” and fully contained in its cell. This bug has appeared, been fixed, and reappeared across builds. If you hit it, the workaround is to avoid bulk-deleting filtered non-adjacent rows: delete rows in contiguous blocks, or clear the filter first. It is not your anchor settings, and no amount of fiddling with them will help.

The honest recommendation: stop anchoring floating images

Here’s the position the standard guides won’t take. The entire “move and size with cells” dance exists because floating pictures sit on a layer above the grid and only pretend to belong to cells. That architecture is the source of every problem in this article — the overlap sensitivity, the pile-ups, the distortion bug.

Microsoft built a proper replacement. The Insert Picture in Cell feature puts the image inside the cell as its actual value, not floating over it. Pictures placed this way sort and filter natively, with no anchor settings to configure, because there’s nothing floating to anchor. If you’re on Microsoft 365 or Office LTSC 2024, this solves the problem you’re reading about so completely that the anchor settings become irrelevant.

The catch, of course, is version. If you’re on Excel 2019 or 2021, Place in Cell doesn’t exist for you, and the floating-image-plus-anchor approach is the only game available — so make the images smaller than their cells, set everything to “Move and size with cells” in one pass, and avoid the bulk-delete bug.

But if you have the newer feature and you’re still wrestling with anchor properties on floating pictures, you’re solving a problem you no longer need to have.

One last thing: anchor behaviour governs how images move on screen, not whether they appear on paper. If your images travel correctly but disappear when you print, that’s a different setting entirely — see images not printing with the sheet.